Fakultas Ilmu Komputer UI

Commit 7b57b11b authored by Wan Muhammad Rayhan Arwindra's avatar Wan Muhammad Rayhan Arwindra 🤸🏽
Browse files

Pbi 6 ray

parent ce1f90c9
......@@ -92,7 +92,6 @@ test("Test edit program renders error", async () => {
});
expect(fetch.mock.calls.length).toEqual(3);
});
test("Test progress program modal", async () => {
fetch.once(
JSON.stringify({
......@@ -184,5 +183,4 @@ test("Test progress program modal submit", async () => {
await fireEvent.submit(getByTestId("save-button"));
});
expect(fetch.mock.calls.length).toEqual(0);
});
});
\ No newline at end of file
......@@ -367,61 +367,62 @@ const DetailProgram = ({ idProgram }) => {
</div>
</div>
</div>
<div
css={css`
margin-top: 1rem;
margin-bottom: 1rem;
`}
>
<div>
<div
css={css`
margin-top: 1rem;
`}
>
<div
css={css`
margin-top: 2rem;
margin-bottom: 1rem;
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 22px;
`}
data-testid="progress"
>
Progress Program
{progressError && <ErrorDiv>Error, progress not found.</ErrorDiv>}
{progress.length > 0 ?
<div>
{progress.map ( p =>
<div key={p.id} css={css `margin-top: 1rem; font-size: 18px`}>
<p data-testid="progress-date">{p.date}</p>
<p>{p.description}</p>
{p.image !== null &&
<Button
onClick={() => handleClickOpen(p.image)}
variant="contained"
color="primary"
size="medium"
data-testid="button-see-proof"
>
Gambar
</Button>
}
</div>
)}
</div>
:<div css={css `margin-top: 1rem ; font-size: 18px`}>Belum ada progress</div>
}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
css={css`
margin-top: 1rem;
margin-bottom: 1rem;
`}
>
<div>
<div
css={css`
margin-top: 1rem;
`}
>
<div
css={css`
margin-top: 2rem;
margin-bottom: 1rem;
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 22px;
margin-left: 70px;
`}
data-testid="progress"
>
Progress Program
{progressError && <ErrorDiv>Error, progress not found.</ErrorDiv>}
{progress.length > 0 ?
<div>
{progress.map ( p =>
<div key={p.id} css={css `margin-top: 1rem; font-size: 18px`}>
<p data-testid="progress-date">{p.date}</p>
<p>{p.description}</p>
{p.image !== null &&
<Button
onClick={() => handleClickOpen(p.image)}
variant="contained"
color="primary"
size="medium"
data-testid="button-see-proof"
>
Gambar
</Button>
}
</div>
)}
</div>
:<div css={css `margin-top: 1rem ; font-size: 18px`}>Belum ada progress</div>
}
</div>
</div>
</div>
</div>
<Dialog
maxWidth="xl"
open={dialogOpen}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment