Browse Source

fix close multiple toastr

Mudana-Grune 3 years ago
parent
commit
9526bd5213

+ 5 - 3
packages/app/test/cypress/integration/60-home/60-home--home.spec.ts

@@ -92,9 +92,11 @@ context('Access User settings', () => {
     cy.get('.Toastify__toast').should('be.visible');
     cy.screenshot(`${ssPrefix}-password-settings-2`);
 
-    cy.get('.Toastify__toast').should('be.visible').within(() => {
-      cy.get('.Toastify__close-button').should('be.visible').click();
-      cy.get('.Toastify__progress-bar').invoke('attr', 'style', 'display: none')
+    cy.get('.Toastify__toast').each((toast) => {
+      cy.wrap(toast).within(() => {
+        cy.get('.Toastify__close-button').should('be.visible').click();
+        cy.get('.Toastify__progress-bar').invoke('attr', 'style', 'display: none')
+      });
     });
   });