Skip to content

Commit

Permalink
fix: handle the tutorial popup in cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
sprutton1 committed Jul 26, 2024
1 parent 074d5c8 commit 50c87b9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
1 change: 1 addition & 0 deletions app/web/cypress/e2e/authentication/logout.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Cypress._.times(SI_CYPRESS_MULTIPLIER, () => {
cy.sendPosthogEvent(Cypress.currentTest.titlePath.join("/"), "test_uuid", UUID);
cy.contains('Create change set', { timeout: 10000 }).should('be.visible');
cy.get('.modal-close-button').should('exist').click();
cy.get('.vbutton').contains("Let's Get Started!").parent().parent().click();
cy.get('[aria-label="Profile"]').should('exist').click();
cy.get('.profile-dropdown-menu-logout').should('exist').should('be.visible').click({ force: true });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ Cypress._.times(SI_CYPRESS_MULTIPLIER, () => {
});
cy.sendPosthogEvent(Cypress.currentTest.titlePath.join("/"), "test_uuid", UUID);

cy.get('#vorm-input-3', { timeout: 30000 }).should('have.value', 'Change Set 1');

cy.get('#vorm-input-3').clear().type(UUID);

cy.get('#vorm-input-3', { timeout: 30000 }).should('have.value', UUID);
cy.get('[class=vorm-input__input]').get('[type=text]').clear().type(UUID);

cy.contains('Create change set', { timeout: 30000 }).click();

// Give time to redirect onto the new change set
cy.url().should('not.include', 'head', { timeout: 10000 });
cy.get('.vbutton').contains("Let's Get Started!").parent().parent().click();

// Create a region component
cy.createComponent("region");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ Cypress._.times(SI_CYPRESS_MULTIPLIER, () => {
return false;
});
cy.sendPosthogEvent(Cypress.currentTest.titlePath.join("/"), "test_uuid", UUID);
cy.get('#vorm-input-3', { timeout: 30000 }).should('have.value', 'Change Set 1');

cy.get('#vorm-input-3').clear().type(UUID);

cy.get('#vorm-input-3', { timeout: 30000 }).should('have.value', UUID);

cy.get('[class=vorm-input__input]').get('[type=text]').clear().type(UUID);
cy.contains('Create change set', { timeout: 30000 }).click();

// Give time to redirect onto the new change set
cy.url().should('not.include', 'head', { timeout: 10000 });
cy.get('.vbutton').contains("Let's Get Started!").parent().parent().click();

// Create a region component
cy.createComponent("region");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,13 @@ Cypress._.times(SI_CYPRESS_MULTIPLIER, () => {
return false;
});
cy.sendPosthogEvent(Cypress.currentTest.titlePath.join("/"), "test_uuid", UUID);
cy.get('#vorm-input-3', { timeout: 30000 }).should('have.value', 'Change Set 1');

cy.get('#vorm-input-3').clear().type(UUID);

cy.get('#vorm-input-3', { timeout: 30000 }).should('have.value', UUID);
cy.get('[class=vorm-input__input]').get('[type=text]').clear().type(UUID);

cy.contains('Create change set', { timeout: 30000 }).click();

// Give time to redirect onto the new change set
cy.wait(1000);
cy.url().should('not.include', 'head', { timeout: 10000 });
cy.get('.vbutton').contains("Let's Get Started!").parent().parent().click();

// Needs a proper way to select from the updated asset tree panel
// Find the region asset
Expand Down Expand Up @@ -92,6 +88,7 @@ Cypress._.times(SI_CYPRESS_MULTIPLIER, () => {

// Give the page a few seconds to load
cy.wait(1000);
cy.get('.vbutton').contains("Let's Get Started!").parent().parent().click();

cy.intercept('POST', '/api/component/update_property_editor_value').as('updatePropertyEditorValue');

Expand All @@ -117,6 +114,7 @@ Cypress._.times(SI_CYPRESS_MULTIPLIER, () => {

// Wait for the values to propagate
cy.wait(10000);
cy.get('.vbutton').contains("Let's Get Started!").parent().parent().click();

// Validate that the value has propagated through the system
cy.get('.attributes-panel-item__input-wrap input.region')
Expand Down

0 comments on commit 50c87b9

Please sign in to comment.