Fix beta login tests
This commit is contained in:
parent
4dbd0b19ae
commit
4282c9df06
|
|
@ -2,8 +2,7 @@ describe('The Login Page', () => {
|
||||||
it('login and redirect to main page', () => {
|
it('login and redirect to main page', () => {
|
||||||
const username = 'test';
|
const username = 'test';
|
||||||
const password = 'test';
|
const password = 'test';
|
||||||
|
cy.visit('/beta-login');
|
||||||
cy.visit('/');
|
|
||||||
cy.login(username, password, true);
|
cy.login(username, password, true);
|
||||||
cy.get('body').contains('Neues Wissen erwerben');
|
cy.get('body').contains('Neues Wissen erwerben');
|
||||||
});
|
});
|
||||||
|
|
@ -35,18 +34,13 @@ describe('The Login Page', () => {
|
||||||
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.');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('redirect after login', () => {
|
it('logs out then logs in again', () => {
|
||||||
const username = 'test';
|
|
||||||
const password = 'test';
|
|
||||||
|
|
||||||
cy.visit('/book/topic/berufliche-grundbildung');
|
const user = 'rahel.cueni';
|
||||||
cy.login(username, password);
|
const pw = 'test'
|
||||||
cy.get('body').contains('Berufliche Grundbildung');
|
|
||||||
});
|
|
||||||
|
|
||||||
it.only('logs out then logs in again', () => {
|
|
||||||
cy.viewport('macbook-15');
|
cy.viewport('macbook-15');
|
||||||
cy.apolloLogin('rahel.cueni', 'test');
|
cy.apolloLogin(user, pw);
|
||||||
cy.visit('/me/my-class');
|
cy.visit('/me/my-class');
|
||||||
cy.get('[data-cy=header-user-widget]').should('exist').within(() => {
|
cy.get('[data-cy=header-user-widget]').should('exist').within(() => {
|
||||||
cy.get('[data-cy=user-widget-avatar]').should('exist').click();
|
cy.get('[data-cy=user-widget-avatar]').should('exist').click();
|
||||||
|
|
@ -54,7 +48,8 @@ describe('The Login Page', () => {
|
||||||
|
|
||||||
cy.get('[data-cy=logout]').click();
|
cy.get('[data-cy=logout]').click();
|
||||||
|
|
||||||
cy.login('rahel.cueni', 'test');
|
cy.visit('/beta-login');
|
||||||
|
cy.login(user, pw);
|
||||||
|
|
||||||
cy.get('[data-cy=header-user-widget]').should('exist').within(() => {
|
cy.get('[data-cy=header-user-widget]').should('exist').within(() => {
|
||||||
cy.get('[data-cy=user-widget-avatar]').should('exist').click();
|
cy.get('[data-cy=user-widget-avatar]').should('exist').click();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue