ImagesTable: Add popovers with error details for failed builds

This removes error details from the image detail and moves them to popovers activated by clicking on "Image build failed" status.

Popovers were also added for clones which didn't include any error details previously.
This commit is contained in:
regexowl 2023-04-18 09:51:18 +02:00 committed by Lucas Garfield
parent 951e5cc035
commit 031fd08b91
6 changed files with 89 additions and 17 deletions

View file

@ -633,18 +633,13 @@ describe('Images Table', () => {
const { getAllByRole } = within(table);
const rows = getAllByRole('row');
const errorToggle = within(rows[2]).getByRole('button', {
name: /details/i,
});
const errorPopover = within(rows[2]).getByText(/image build failed/i);
expect(
screen.getAllByText(/c1cfa347-4c37-49b5-8e73-6aa1d1746cfa/i)[1]
).not.toBeVisible();
await user.click(errorToggle);
await user.click(errorPopover);
expect(
screen.getAllByText(/c1cfa347-4c37-49b5-8e73-6aa1d1746cfa/i)[1]
).toBeVisible();
expect(screen.getAllByText(/Error in depsolve job/i)[0]).toBeVisible();
});
});