Use Case: I upload 27 images, and check to see whether the image list has those images.
Problem: Whilst the code is in the correct order, the assertion is made before the POST
requests, thus failing the test.
Image:
Code:
it('Can upload many images and see them', () => {
cy.get('[datacy="uploadImages"]')
.selectFile(
[
"cypress/fixtures/images/example.jpeg",
...
], { force: true });
cy.get('.MuiAlert-message').should("be.visible");
cy.get("[datacy='manageMediaImageList']").find("img").should("have.length", 15);
});