ImagesTable: refactor list of images

Remove unnecessary styling on the rows in the images list. Reorder the
columns to put the target and status next to each other. Use upload_type
instead of upload_status. Stop storing columns in state since they are a
constant.
This commit is contained in:
Jacob Kozol 2021-04-27 14:17:20 +02:00 committed by Sanne Raymaekers
parent a10e1746e5
commit f8abe70004
2 changed files with 15 additions and 28 deletions

View file

@ -263,12 +263,12 @@ describe('Images Table', () => {
// render the expected <ImageBuildStatus /> and compare the text content
let testElement = document.createElement('testElement');
render(<ImageBuildStatus status={ compose.image_status.status } />, { container: testElement });
render(<Upload uploadType={ compose.request.image_requests[0].upload_request.type } />, { container: testElement });
expect(row.cells[3]).toHaveTextContent(testElement.textContent);
// do the same for the upload/target column
render(<Upload uploadType={ compose.request.image_requests[0].image_type } />, { container: testElement });
expect(row.cells[1]).toHaveTextContent(testElement.textContent);
// render the expected <ImageBuildStatus /> and compare the text content
render(<ImageBuildStatus status={ compose.image_status.status } />, { container: testElement });
expect(row.cells[4]).toHaveTextContent(testElement.textContent);
}
});
});