Use app logout
This commit is contained in:
parent
e93dde272d
commit
31de68e3d0
|
|
@ -7,7 +7,7 @@ describe('Change Password Page', () => {
|
||||||
const validationOldWrongMsg = 'Die Eingabe ist falsch';
|
const validationOldWrongMsg = 'Die Eingabe ist falsch';
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
cy.logout();
|
// cy.clearCookies();
|
||||||
cy.visit('/me/profile');
|
cy.visit('/me/profile');
|
||||||
cy.login('rahel.cueni', 'test');
|
cy.login('rahel.cueni', 'test');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ describe('Solutions', () => {
|
||||||
|
|
||||||
cy.logout();
|
cy.logout();
|
||||||
|
|
||||||
cy.login('rahel.cueni', 'test');
|
|
||||||
cy.visit('/module/lohn-und-budget');
|
cy.visit('/module/lohn-und-budget');
|
||||||
|
cy.login('rahel.cueni', 'test');
|
||||||
// cy.get('[data-cy=solution]').should('exist');
|
// cy.get('[data-cy=solution]').should('exist');
|
||||||
cy.get('[data-cy=solution]').first()
|
cy.get('[data-cy=solution]').first()
|
||||||
.should('contain', 'anzeigen')
|
.should('contain', 'anzeigen')
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ describe('Survey', () => {
|
||||||
|
|
||||||
cy.viewport('macbook-15');
|
cy.viewport('macbook-15');
|
||||||
cy.startGraphQLCapture();
|
cy.startGraphQLCapture();
|
||||||
cy.login('rahel.cueni', 'test');
|
cy.login('rahel.cueni', 'test', true);
|
||||||
|
cy.get('body').contains('Neues Wissen erwerben');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display and fill out the survey', () => {
|
it('should display and fill out the survey', () => {
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,15 @@ Cypress.Commands.add("login", (username, password, visitLogin=false) => {
|
||||||
cy.get('[data-cy=login-button]').click();
|
cy.get('[data-cy=login-button]').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add("logout", () => {
|
Cypress.Commands.add("clearCookies", () => {
|
||||||
cy.clearCookies();
|
cy.clearCookies();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add("logout", () => {
|
||||||
|
cy.get('[data-cy=user-icon]').click();
|
||||||
|
cy.get('[data-cy=logout]').click();
|
||||||
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('loginByCsrf', (username, password, csrftoken) => {
|
Cypress.Commands.add('loginByCsrf', (username, password, csrftoken) => {
|
||||||
cy.request({
|
cy.request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" data-cy="user-icon">
|
||||||
<path
|
<path
|
||||||
d="M50,0A50.12,50.12,0,0,0,.07,46.65S0,48.23,0,50s.07,3.25.07,3.36A50,50,0,1,0,50,0ZM24.14,86V79.84A15.18,15.18,0,0,1,39.31,64.67H60.69A15.18,15.18,0,0,1,75.86,79.84V86a44.27,44.27,0,0,1-51.72,0Zm57.47-5V79.84A20.94,20.94,0,0,0,60.69,58.93H39.31A20.94,20.94,0,0,0,18.39,79.84v1.31a44.4,44.4,0,1,1,63.22-.06Z"/>
|
d="M50,0A50.12,50.12,0,0,0,.07,46.65S0,48.23,0,50s.07,3.25.07,3.36A50,50,0,1,0,50,0ZM24.14,86V79.84A15.18,15.18,0,0,1,39.31,64.67H60.69A15.18,15.18,0,0,1,75.86,79.84V86a44.27,44.27,0,0,1-51.72,0Zm57.47-5V79.84A20.94,20.94,0,0,0,60.69,58.93H39.31A20.94,20.94,0,0,0,18.39,79.84v1.31a44.4,44.4,0,1,1,63.22-.06Z"/>
|
||||||
<path
|
<path
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue