Skip to content

Commit 3faa1db

Browse files
Copilotrenemadsen
andcommitted
Fix broken cypress tests by adding proper waits after cancel operations
Co-authored-by: renemadsen <[email protected]>
1 parent 4ba83b7 commit 3faa1db

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

eform-client/cypress/e2e/d/device-users.add.spec.cy.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('Device users page - Should not add new device user', function () {
7474
cy.get('#saveCreateBtn').should('be.disabled');
7575

7676
cy.get('#cancelCreateBtn').should('be.visible').click();
77-
cy.wait(500);
77+
cy.get('#newDeviceUserBtn', { timeout: 10000 }).should('be.visible');
7878
});
7979

8080
it('should NOT add device user with only last name', () => {
@@ -99,7 +99,6 @@ describe('Device users page - Should not add new device user', function () {
9999

100100
cy.get('#cancelCreateBtn').should('be.visible').click();
101101
cy.get('#newDeviceUserBtn', { timeout: 10000 }).should('be.visible');
102-
cy.wait(500);
103102
});
104103

105104
it('should NOT create user if cancel was clicked', () => {
@@ -109,10 +108,8 @@ describe('Device users page - Should not add new device user', function () {
109108
deviceUsersPage.rowNum().then((rowCountBeforeCreation) => {
110109
cy.get('#newDeviceUserBtn', { timeout: 10000 }).should('be.visible').click();
111110
cy.get('#firstName').should('be.visible');
112-
cy.wait(500);
113111
cy.get('#cancelCreateBtn').should('be.visible').click();
114112
cy.get('#newDeviceUserBtn', { timeout: 10000 }).should('be.visible');
115-
cy.wait(500);
116113

117114
deviceUsersPage.rowNum().then((rowCountAfterCreation) => {
118115
expect(

0 commit comments

Comments
 (0)