Skip to content

Commit

Permalink
Merge pull request #4254 from systeminit/chore/fixup-cypress-tests
Browse files Browse the repository at this point in the history
chore: minor fixups to cypress tests
  • Loading branch information
johnrwatson authored Jul 30, 2024
2 parents a09f884 + f39a38b commit 3c200c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ Cypress._.times(SI_CYPRESS_MULTIPLIER, () => {
cy.appModelPageLoaded();
cy.clickButtonByIdIfExists("first-time-modal-continue-button");

// This is needed if the page has loaded, but the function to propogate the value has not passed yet
cy.wait(10000);

// Validate that the value has propagated through the system
cy.get('.attributes-panel-item__input-wrap input.region')
.should('have.value', 'us-east-1');
Expand Down
3 changes: 2 additions & 1 deletion app/web/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ Cypress.Commands.add('clickButtonByIdIfExists', (id: string) => {
if ($body.find(`#${id}`).length > 0) {
// Element exists, perform click
cy.log(`Trying to click the #${id} now`);
cy.get(`#${id}`).click();
// Sometimes the div is hidden behind another modal, the force allows it to be clicked anyway
cy.get(`#${id}`).click( { force: true });
} else {
// Element does not exist, continue with other actions
cy.log('Button not found, continuing with other actions');
Expand Down

0 comments on commit 3c200c5

Please sign in to comment.