From 3e77457b817232be9939cb29200d7dddcc30d4be Mon Sep 17 00:00:00 2001 From: Mole Date: Fri, 9 Oct 2020 09:49:09 +0200 Subject: [PATCH] Increase typing timeout in member tests and some minor cleaning --- .../cypress/integration/Members/members.js | 5 +++-- .../cypress/integration/Settings/templates.ts | 11 ++++++----- .../cypress/integration/Tour/backofficeTour.ts | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Members/members.js b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Members/members.js index aeb4576ccd..3d257cfa58 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Members/members.js +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Members/members.js @@ -9,6 +9,7 @@ context('Members', () => { const name = "Alice Bobson"; const email = "alice-bobson@acceptancetest.umbraco"; const password = "$AUlkoF*St0kgPiyyVEk5iU5JWdN*F7&@OSl5Y4pOofnidfifkBj5Ns2ONv%FzsTl36V1E924Gw97zcuSeT7UwK&qb5l&O9h!d!w"; + const passwordTimeout = 20000 cy.umbracoEnsureMemberEmailNotExists(email); cy.umbracoSection('member'); @@ -24,8 +25,8 @@ context('Members', () => { cy.get('input#_umb_login').clear().type(email); cy.get('input#_umb_email').clear().type(email); - cy.get('input#password').clear().type(password); - cy.get('input#confirmPassword').clear().type(password); + cy.get('input#password').clear().type(password, { timeout: passwordTimeout }); + cy.get('input#confirmPassword').clear().type(password, { timeout: passwordTimeout }); // Save cy.get('.btn-success').click(); diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts index 36fa447d1e..39e303a486 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts @@ -28,19 +28,20 @@ context('Templates', () => { // Save // We must drop focus for the auto save event to occur. cy.get('.btn-success').focus(); - // And then wait for the auto save event to finish but finding the page in the tree view + // And then wait for the auto save event to finish by finding the page in the tree view. // This is a bit of a roundabout way to find items in a treev view since we dont use umbracoTreeItem - // But we must be able to wait for the save evnent to finish, and we can't do that with umbracoTreeItem - cy.get('[data-element="tree-item-templates"] > :nth-child(2) > .umb-animated > .umb-tree-item__inner > .umb-tree-item__label').contains(name).should('be.visible', {timeout:10000}); + // but we must be able to wait for the save evnent to finish, and we can't do that with umbracoTreeItem + cy.get('[data-element="tree-item-templates"] > :nth-child(2) > .umb-animated > .umb-tree-item__inner > .umb-tree-item__label') + .contains(name).should('be.visible', { timeout: 10000 }); // Now that the auto save event has finished we can save - // And there wont be any duplicates or file in use errors. + // and there wont be any duplicates or file in use errors. cy.get('.btn-success').click(); //Assert cy.umbracoSuccessNotification().should('be.visible'); // For some reason cy.umbracoErrorNotification tries to click the element which is not possible // if it doesn't actually exist, making should('not.be.visible') impossible. - cy.get('.umb-notifications__notifications > .alert-error', {timeout: 5000}).should('not.be.visible'); + cy.get('.umb-notifications__notifications > .alert-error').should('not.be.visible'); //Clean up cy.umbracoEnsureTemplateNameNotExists(name); diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Tour/backofficeTour.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Tour/backofficeTour.ts index e7f250d2be..9bc1fff488 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Tour/backofficeTour.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Tour/backofficeTour.ts @@ -71,7 +71,7 @@ function resetTourData() { function runBackOfficeIntroTour(percentageComplete, buttonText, timeout) { cy.get('[data-element="help-tours"]').should("be.visible"); cy.get('[data-element="help-tours"]').click(); - cy.get('[data-element="help-tours"] .umb-progress-circle', { timeout: timeout }).get('[percentage]').contains(percentageComplete + '%', {timeout: timeout}); + cy.get('[data-element="help-tours"] .umb-progress-circle', { timeout: timeout }).get('[percentage]').contains(percentageComplete + '%', { timeout: timeout }); cy.get('[data-element="help-tours"]').click(); cy.get('[data-element="tour-umbIntroIntroduction"] .umb-button').should("be.visible"); cy.get('[data-element="tour-umbIntroIntroduction"] .umb-button').contains(buttonText);