Increase typing timeout in member tests and some minor cleaning

This commit is contained in:
Mole
2020-10-09 09:49:09 +02:00
parent c8018ed00a
commit 3e77457b81
3 changed files with 10 additions and 8 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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);