From 4d80dab441381caecfcb5d1493db57bf7a096dfd Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 18 Jan 2019 13:45:40 +0100 Subject: [PATCH] Fixed settings form and its test --- cypress/integration/common/settings.js | 12 ++- pages/settings/index.vue | 100 ++++++++++++++----------- 2 files changed, 63 insertions(+), 49 deletions(-) diff --git a/cypress/integration/common/settings.js b/cypress/integration/common/settings.js index 048f37b7a..b7b283e2b 100644 --- a/cypress/integration/common/settings.js +++ b/cypress/integration/common/settings.js @@ -16,9 +16,9 @@ const setUserName = name => { cy.get('input[id=name]') .clear() .type(name) - cy.contains('Save') + cy.get('[type=submit]') .click() - .wait(200) + .not('[disabled]') myName = name } @@ -31,7 +31,9 @@ When('I save {string} as my location', location => { cy.get('.ds-select-option') .contains(location) .click() - cy.contains('Save').click() + cy.get('[type=submit]') + .click() + .not('[disabled]') myLocation = location }) @@ -39,7 +41,9 @@ When('I have the following self-description:', text => { cy.get('textarea[id=bio]') .clear() .type(text) - cy.contains('Save').click() + cy.get('[type=submit]') + .click() + .not('[disabled]') aboutMeText = text }) diff --git a/pages/settings/index.vue b/pages/settings/index.vue index 94120ddf0..9db497906 100644 --- a/pages/settings/index.vue +++ b/pages/settings/index.vue @@ -1,45 +1,51 @@