diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-04-27 12:48:15 +0300 |
---|---|---|
committer | Luka Trovic <luka@nextcloud.com> | 2022-05-11 13:20:01 +0300 |
commit | 7e32a169697c6bd5e8814735b3df8487fd48f433 (patch) | |
tree | cb01a2a697e00fac62a618a5b252b281c2de13dc /cypress | |
parent | 349c94ee23b45e141618fd1ff4dc5cf00e3c1109 (diff) |
Adapt login command to server master change
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/support/commands.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 7335dcb0..65911685 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -19,28 +19,28 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - + const url = Cypress.config('baseUrl').replace(/\/index.php\/?$/g, '') Cypress.env('baseUrl', url) - + Cypress.Commands.add('login', (user, password, route = '/apps/deck/') => { - let session = `${user}-${Date.now()}` + let session = `${user}-${Date.now()}` cy.session(session, function () { cy.visit(route) cy.get('input[name=user]').type(user) cy.get('input[name=password]').type(password) - cy.get('#submit-wrapper input[type=submit]').click() + cy.get('.submit-wrapper input[type=submit]').click() cy.url().should('include', route) }) // in case the session already existed but we are on a different route... cy.visit(route) }) - + Cypress.Commands.add('logout', (route = '/') => { cy.session('_guest', function () { }) }) - + Cypress.Commands.add('nextcloudCreateUser', (user, password) => { cy.clearCookies() cy.request({ @@ -60,7 +60,7 @@ cy.log(`Created user ${user}`, response.status) }) }) - + Cypress.Commands.add('nextcloudUpdateUser', (user, password, key, value) => { cy.request({ method: 'PUT', @@ -79,7 +79,7 @@ Cypress.Commands.add('deckCreateBoard', ({ user, password }, title) => { cy.login(user, password) - + cy.get('.app-navigation button.app-navigation-toggle').click() cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry') .eq(1) @@ -97,7 +97,7 @@ Cypress.Commands.add('deckCreateList', ({ user, password }, title) => { cy.login(user, password) - + cy.get('.app-navigation button.app-navigation-toggle').click() cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry') .eq(1) @@ -112,4 +112,4 @@ .first() .click() }) - + |