Fakultas Ilmu Komputer UI

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

Merge branch 'PBI-6-Ray' into 'staging'

Pbi 6 ray

See merge request !92
parents ce1f90c9 7b57b11b
Pipeline #60434 passed with stages
in 12 minutes and 30 seconds
...@@ -92,7 +92,6 @@ test("Test edit program renders error", async () => { ...@@ -92,7 +92,6 @@ test("Test edit program renders error", async () => {
}); });
expect(fetch.mock.calls.length).toEqual(3); expect(fetch.mock.calls.length).toEqual(3);
}); });
test("Test progress program modal", async () => { test("Test progress program modal", async () => {
fetch.once( fetch.once(
JSON.stringify({ JSON.stringify({
...@@ -184,5 +183,4 @@ test("Test progress program modal submit", async () => { ...@@ -184,5 +183,4 @@ test("Test progress program modal submit", async () => {
await fireEvent.submit(getByTestId("save-button")); await fireEvent.submit(getByTestId("save-button"));
}); });
expect(fetch.mock.calls.length).toEqual(0); expect(fetch.mock.calls.length).toEqual(0);
}); });
\ No newline at end of file
...@@ -367,61 +367,62 @@ const DetailProgram = ({ idProgram }) => { ...@@ -367,61 +367,62 @@ const DetailProgram = ({ idProgram }) => {
</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;
`}
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> </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 <Dialog
maxWidth="xl" maxWidth="xl"
open={dialogOpen} 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