Skip to content

Commit

Permalink
fix: before.cy.tsx to chain events properly
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorreem committed Aug 27, 2024
1 parent 081c626 commit 6863099
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions cypress/integration/before/before.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ describe('Initial cleanup test', () => {
cy.logInWithEmailAndPassword(
Cypress.env('CYPRESS_SUPER_ADMIN_EMAIL'),
Cypress.env('CYPRESS_SUPER_ADMIN_PASSWORD'),
);

try {
).then(() => {
cy.deleteCypressAccessCodes();
cy.deleteAllCypressUsers();
cy.log('Before all function completed - stale cypress users deleted');
} catch (error) {
cy.log(
`Before all function failed - catching error to prevent failing tests. Error: ${error}`,
);
}
cy.deleteAllCypressUsers().then(() => {
cy.log('Before all function completed - stale cypress users deleted');
});

cy.logout();
cy.logout();
});
});
});

0 comments on commit 6863099

Please sign in to comment.