Fix cypress tests

This commit is contained in:
Christian Cueni 2020-02-27 13:37:32 +01:00
parent 096fe77d46
commit ca90f32e03
4 changed files with 6 additions and 8 deletions

View File

@ -1,5 +1,4 @@
{ {
"data": {
"__schema": { "__schema": {
"queryType": { "queryType": {
"name": "Query" "name": "Query"
@ -15970,5 +15969,4 @@
} }
] ]
} }
} }
}

View File

@ -25,7 +25,7 @@ describe('Email Verifcation', () => {
cy.visit('/license-activation'); cy.visit('/license-activation');
cy.redeemCoupon('12345asfd'); cy.redeemCoupon('12345asfd');
cy.get('finishTest') cy.get('body').contains('Neues Wissen erwerben');
}); });

View File

@ -12,7 +12,7 @@ describe('The Login Page', () => {
const username = ''; const username = '';
const password = 'test'; const password = 'test';
cy.visit('/old-login'); cy.visit('/beta-login');
cy.login(username, password); cy.login(username, password);
cy.get('[data-cy=email-local-errors]').contains('E-Mail ist ein Pflichtfeld'); cy.get('[data-cy=email-local-errors]').contains('E-Mail ist ein Pflichtfeld');
}); });
@ -21,7 +21,7 @@ describe('The Login Page', () => {
const username = 'test'; const username = 'test';
const password = ''; const password = '';
cy.visit('/old-login'); cy.visit('/beta-login');
cy.login(username, password); cy.login(username, password);
cy.get('[data-cy=password-local-errors]').contains('Passwort ist ein Pflichtfeld'); cy.get('[data-cy=password-local-errors]').contains('Passwort ist ein Pflichtfeld');
}); });
@ -30,7 +30,7 @@ describe('The Login Page', () => {
const username = 'test'; const username = 'test';
const password = '12345'; const password = '12345';
cy.visit('/old-login'); cy.visit('/beta-login');
cy.login(username, password); cy.login(username, password);
cy.get('[data-cy=login-error]').contains('Die E-Mail oder das Passwort ist falsch. Bitte versuchen Sie nochmals.'); cy.get('[data-cy=login-error]').contains('Die E-Mail oder das Passwort ist falsch. Bitte versuchen Sie nochmals.');
}); });

View File

@ -54,7 +54,7 @@ Cypress.Commands.add('apolloLogin', (username, password) => {
// todo: replace with apollo call // todo: replace with apollo call
Cypress.Commands.add("login", (username, password, visitLogin = false) => { Cypress.Commands.add("login", (username, password, visitLogin = false) => {
if (visitLogin) { if (visitLogin) {
cy.visit('/old-login'); cy.visit('/beta-login');
} }
if (username != '') { if (username != '') {