Skip to content

Commit 2b77afb

Browse files
committed
Wait for text field ajax updates
Fixes an issue where the text field is cleared if the dropdown is selected before the ajax update is processed, causing errors such as "Title can't be blank"
1 parent 454d6bb commit 2b77afb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cypress/e2e/ui/Overview/reports.cy.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ describe('Overview > Reports Tests', () => {
2020
});
2121
});
2222

23-
// Fill out report information
23+
// Fill out report information, wait for fields changed
24+
cy.intercept('/report/form_field_changed/new').as('fieldsChanged');
2425
cy.get('#name').type('Cypress Test Report', { force: true });
25-
cy.get('#title').type('Cypress test report title', { force: true });
26+
cy.wait('@fieldsChanged')
27+
28+
cy.get('#title').type('Cypress test report title', { force: true })
29+
cy.wait('@fieldsChanged')
2630

2731
let basedOn = '';
2832
let columns = [];

0 commit comments

Comments
 (0)