From 50c87b957a85371c683679bea3ddcbc98df831cc Mon Sep 17 00:00:00 2001 From: Scott Prutton Date: Fri, 26 Jul 2024 12:51:13 -0400 Subject: [PATCH] fix: handle the tutorial popup in cypress --- app/web/cypress/e2e/authentication/logout.cy.ts | 1 + .../e2e/modelling-functionality/create-component.cy.ts | 7 ++----- .../e2e/modelling-functionality/delete-component.cy.ts | 7 ++----- .../value-attribute-propogation.cy.ts | 10 ++++------ 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/app/web/cypress/e2e/authentication/logout.cy.ts b/app/web/cypress/e2e/authentication/logout.cy.ts index 83e5ca3d18..c4479ffb1d 100644 --- a/app/web/cypress/e2e/authentication/logout.cy.ts +++ b/app/web/cypress/e2e/authentication/logout.cy.ts @@ -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 }); diff --git a/app/web/cypress/e2e/modelling-functionality/create-component.cy.ts b/app/web/cypress/e2e/modelling-functionality/create-component.cy.ts index 557e2e2669..86029f372e 100644 --- a/app/web/cypress/e2e/modelling-functionality/create-component.cy.ts +++ b/app/web/cypress/e2e/modelling-functionality/create-component.cy.ts @@ -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"); diff --git a/app/web/cypress/e2e/modelling-functionality/delete-component.cy.ts b/app/web/cypress/e2e/modelling-functionality/delete-component.cy.ts index f004efbf57..5b00aa2ca0 100644 --- a/app/web/cypress/e2e/modelling-functionality/delete-component.cy.ts +++ b/app/web/cypress/e2e/modelling-functionality/delete-component.cy.ts @@ -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"); diff --git a/app/web/cypress/e2e/modelling-functionality/value-attribute-propogation.cy.ts b/app/web/cypress/e2e/modelling-functionality/value-attribute-propogation.cy.ts index 29047d1d69..3ec32fa352 100644 --- a/app/web/cypress/e2e/modelling-functionality/value-attribute-propogation.cy.ts +++ b/app/web/cypress/e2e/modelling-functionality/value-attribute-propogation.cy.ts @@ -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 @@ -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'); @@ -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')