diff --git a/client/cypress.json b/client/cypress.e2e.json similarity index 100% rename from client/cypress.json rename to client/cypress.e2e.json diff --git a/client/cypress/integration/bookmarks.spec.js b/client/cypress/integration/e2e/bookmarks.spec.js similarity index 100% rename from client/cypress/integration/bookmarks.spec.js rename to client/cypress/integration/e2e/bookmarks.spec.js diff --git a/client/cypress/integration/email-verification.spec.js b/client/cypress/integration/e2e/email-verification.spec.js similarity index 100% rename from client/cypress/integration/email-verification.spec.js rename to client/cypress/integration/e2e/email-verification.spec.js diff --git a/client/cypress/integration/new-student.spec.js b/client/cypress/integration/e2e/new-student.spec.js similarity index 81% rename from client/cypress/integration/new-student.spec.js rename to client/cypress/integration/e2e/new-student.spec.js index 15425f84..f56eb2fa 100644 --- a/client/cypress/integration/new-student.spec.js +++ b/client/cypress/integration/e2e/new-student.spec.js @@ -1,5 +1,5 @@ -const schema = require('../fixtures/schema.json'); -const me = require('../fixtures/me.new-student.json'); +const schema = require('../../fixtures/schema.json'); +const me = require('../../fixtures/me.new-student.json'); describe('New student', () => { it('shows "Enter Code" page and adds the user to a class', () => { @@ -9,7 +9,7 @@ describe('New student', () => { schema: schema, }); - cy.apolloLogin('hansli', 'test'); + cy.fakeLogin('hansli', 'test'); const __typename = 'SchoolClassNode'; const name = 'KF1A'; @@ -38,6 +38,11 @@ describe('New student', () => { members: [] } } + }, + UpdateOnboardingProgress: { + updateOnboardingProgress: { + success: true + } } } }); diff --git a/client/cypress/integration/registration.spec.js b/client/cypress/integration/e2e/registration.spec.js similarity index 100% rename from client/cypress/integration/registration.spec.js rename to client/cypress/integration/e2e/registration.spec.js diff --git a/client/cypress/integration/rooms/room-page.spec.js b/client/cypress/integration/e2e/rooms/room-page.spec.js similarity index 100% rename from client/cypress/integration/rooms/room-page.spec.js rename to client/cypress/integration/e2e/rooms/room-page.spec.js diff --git a/client/cypress/integration/rooms/rooms-page.spec.js b/client/cypress/integration/e2e/rooms/rooms-page.spec.js similarity index 100% rename from client/cypress/integration/rooms/rooms-page.spec.js rename to client/cypress/integration/e2e/rooms/rooms-page.spec.js diff --git a/client/cypress/integration/solutions.spec.js b/client/cypress/integration/e2e/solutions.spec.js similarity index 100% rename from client/cypress/integration/solutions.spec.js rename to client/cypress/integration/e2e/solutions.spec.js diff --git a/client/cypress/integration/users/beta-login.spec.js b/client/cypress/integration/e2e/users/beta-login.spec.js similarity index 100% rename from client/cypress/integration/users/beta-login.spec.js rename to client/cypress/integration/e2e/users/beta-login.spec.js diff --git a/client/cypress/integration/users/coupon.spec.js b/client/cypress/integration/e2e/users/coupon.spec.js similarity index 96% rename from client/cypress/integration/users/coupon.spec.js rename to client/cypress/integration/e2e/users/coupon.spec.js index 6fcd9931..9105ce2a 100644 --- a/client/cypress/integration/users/coupon.spec.js +++ b/client/cypress/integration/e2e/users/coupon.spec.js @@ -1,6 +1,6 @@ import { GraphQLError } from 'graphql'; -const schema = require('../../fixtures/schema.json'); +const schema = require('../../../fixtures/schema.json'); describe('Email Verifcation', () => { beforeEach(() => { diff --git a/client/cypress/integration/users/login.spec.js b/client/cypress/integration/e2e/users/login.spec.js similarity index 97% rename from client/cypress/integration/users/login.spec.js rename to client/cypress/integration/e2e/users/login.spec.js index 54d96134..678852fc 100644 --- a/client/cypress/integration/users/login.spec.js +++ b/client/cypress/integration/e2e/users/login.spec.js @@ -1,4 +1,4 @@ -const schema = require('../../fixtures/schema_public.json'); +const schema = require('../../../fixtures/schema_public.json'); const isEmailAvailableUrl = '**/rest/deutsch/V1/customers/isEmailAvailable'; const checkPasswordUrl = '**/rest/deutsch/V1/integration/customer/token'; diff --git a/client/cypress/integration/current-module.spec.js b/client/cypress/integration/frontend/current-module.spec.js similarity index 90% rename from client/cypress/integration/current-module.spec.js rename to client/cypress/integration/frontend/current-module.spec.js index 8a195239..d6125860 100644 --- a/client/cypress/integration/current-module.spec.js +++ b/client/cypress/integration/frontend/current-module.spec.js @@ -1,11 +1,11 @@ -const schema = require('../fixtures/schema.json'); -const assignments = require('../fixtures/assignments.json'); -const mePayload = require('../fixtures/me.join-class.json'); -const topics = require('../fixtures/topics.json'); -const baseTopic = require('../fixtures/geld-und-kauf.json'); +const schema = require('../../fixtures/schema.json'); +const assignments = require('../../fixtures/assignments.json'); +const mePayload = require('../../fixtures/me.join-class.json'); +const topics = require('../../fixtures/topics.json'); +const baseTopic = require('../../fixtures/geld-und-kauf.json'); -const moduleTeasers = require('../fixtures/module-teasers.json'); -const fullModules = require('../fixtures/full-modules.json'); +const moduleTeasers = require('../../fixtures/module-teasers.json'); +const fullModules = require('../../fixtures/full-modules.json'); const topic = { topic: { @@ -104,7 +104,8 @@ describe('Current Module', () => { it('is set correctly', () => { cy.viewport('macbook-15'); - cy.apolloLogin('nico.zickgraf', 'test'); + cy.fakeLogin('nico.zickgraf', 'test'); + // cy.apolloLogin('nico.zickgraf', 'test'); cy.visit('/'); // module list exists, but does not have anything in it diff --git a/client/cypress/integration/home-page.spec.js b/client/cypress/integration/frontend/home-page.spec.js similarity index 100% rename from client/cypress/integration/home-page.spec.js rename to client/cypress/integration/frontend/home-page.spec.js diff --git a/client/cypress/integration/new-project.spec.js b/client/cypress/integration/frontend/new-project.spec.js similarity index 92% rename from client/cypress/integration/new-project.spec.js rename to client/cypress/integration/frontend/new-project.spec.js index eb7a0799..681c99a6 100644 --- a/client/cypress/integration/new-project.spec.js +++ b/client/cypress/integration/frontend/new-project.spec.js @@ -1,4 +1,4 @@ -const schema = require('../fixtures/schema.json'); +const schema = require('../../fixtures/schema.json'); describe('New project', () => { it('creates a new project and displays it', () => { @@ -46,7 +46,8 @@ describe('New project', () => { ; cy.viewport('macbook-15'); - cy.apolloLogin('rahel.cueni', 'test'); + cy.fakeLogin('rahel.cueni', 'test'); + // cy.apolloLogin('rahel.cueni', 'test'); cy.visit('/portfolio'); cy.get('[data-cy=add-project-button]').click(); @@ -55,5 +56,5 @@ describe('New project', () => { cy.get('[data-cy=page-form-input-ziele]').type('Git gud'); cy.get('[data-cy=save-project-button]').click(); cy.get('.project-widget:first').contains('random'); - }) + }); }); diff --git a/client/cypress/integration/onboarding.spec.js b/client/cypress/integration/frontend/onboarding.spec.js similarity index 92% rename from client/cypress/integration/onboarding.spec.js rename to client/cypress/integration/frontend/onboarding.spec.js index c6febd44..f4ab3382 100644 --- a/client/cypress/integration/onboarding.spec.js +++ b/client/cypress/integration/frontend/onboarding.spec.js @@ -1,5 +1,5 @@ -const schema = require('../fixtures/schema.json'); -const me = require('../fixtures/me.join-class.json'); +const schema = require('../../fixtures/schema.json'); +const me = require('../../fixtures/me.join-class.json'); describe('Onboarding', () => { beforeEach(() => { diff --git a/client/cypress/integration/project-entry.spec.js b/client/cypress/integration/frontend/project-entry.spec.js similarity index 96% rename from client/cypress/integration/project-entry.spec.js rename to client/cypress/integration/frontend/project-entry.spec.js index ec9c0a77..68ae7f31 100644 --- a/client/cypress/integration/project-entry.spec.js +++ b/client/cypress/integration/frontend/project-entry.spec.js @@ -1,10 +1,10 @@ -const schema = require('../fixtures/schema.json'); -const me = require('../fixtures/me.new-student.json'); +const schema = require('../../fixtures/schema.json'); +const me = require('../../fixtures/me.new-student.json'); describe('Project Entry', () => { beforeEach(() => { cy.viewport('macbook-15'); - cy.apolloLogin('rahel.cueni', 'test'); + cy.fakeLogin('rahel.cueni', 'test'); cy.mockGraphql({ schema: schema, @@ -119,7 +119,7 @@ describe('Project Entry', () => { cy.get('[data-cy=modal-save-button]').click(); cy.get('.project-entry:last-of-type').within(() => { - cy.get('.project-entry__paragraph:first-of-type').contains('Join the Guardians') + cy.get('.project-entry__paragraph:first-of-type').contains('Join the Guardians'); }); }); diff --git a/client/cypress/integration/school-class.spec.js b/client/cypress/integration/frontend/school-class.spec.js similarity index 96% rename from client/cypress/integration/school-class.spec.js rename to client/cypress/integration/frontend/school-class.spec.js index 9aa7b748..b7e30324 100644 --- a/client/cypress/integration/school-class.spec.js +++ b/client/cypress/integration/frontend/school-class.spec.js @@ -1,6 +1,6 @@ -const schema = require('../fixtures/schema.json'); -const me = require('../fixtures/me.join-class.json'); -const selectedClass = require('../fixtures/selected-school-class.json'); +const schema = require('../../fixtures/schema.json'); +const me = require('../../fixtures/me.join-class.json'); +const selectedClass = require('../../fixtures/selected-school-class.json'); describe('Class Management', () => { beforeEach(() => { @@ -11,8 +11,7 @@ describe('Class Management', () => { }); cy.viewport('macbook-15'); - cy.apolloLogin('rahel.cueni', 'test'); - + cy.fakeLogin('rahel.cueni', 'test'); }); // fixme: cache misbehaves with mequery, but only for test @@ -181,12 +180,10 @@ describe('Class Management', () => { cy.visit('/me/old-classes'); cy.get('[data-cy=old-class-item]').should('have.length', 1); - }); }); describe('Teacher Class Management', () => { - beforeEach(() => { cy.server(); @@ -195,8 +192,7 @@ describe('Teacher Class Management', () => { }); cy.viewport('macbook-15'); - cy.apolloLogin('nico.zickgraf', 'test'); - + cy.fakeLogin('nico.zickgraf', 'test'); }); it('changes class name', () => { diff --git a/client/cypress/integration/spellcheck.spec.js b/client/cypress/integration/frontend/spellcheck.spec.js similarity index 72% rename from client/cypress/integration/spellcheck.spec.js rename to client/cypress/integration/frontend/spellcheck.spec.js index 4ca139dd..ef5c5b04 100644 --- a/client/cypress/integration/spellcheck.spec.js +++ b/client/cypress/integration/frontend/spellcheck.spec.js @@ -1,7 +1,7 @@ -const schema = require('../fixtures/schema.json'); -const assignments = require('../fixtures/assignments.json'); -const module = require('../fixtures/module.json'); -const spellCheck = require('../fixtures/spell-check.json'); +const schema = require('../../fixtures/schema.json'); +const assignments = require('../../fixtures/assignments.json'); +const module = require('../../fixtures/module.json'); +const spellCheck = require('../../fixtures/spell-check.json'); describe('Spellcheck', () => { before(() => { @@ -29,7 +29,7 @@ describe('Spellcheck', () => { }); it('should highlight three errors', () => { - cy.apolloLogin('rahel.cueni', 'test'); + cy.fakeLogin('rahel.cueni', 'test'); cy.visit('/module/lohn-und-budget/'); cy.get('.spellcheck__correction').should('have.length', 0); diff --git a/client/cypress/integration/survey.spec.js b/client/cypress/integration/frontend/survey.spec.js similarity index 91% rename from client/cypress/integration/survey.spec.js rename to client/cypress/integration/frontend/survey.spec.js index 5c5c96a4..ab0e0c3f 100644 --- a/client/cypress/integration/survey.spec.js +++ b/client/cypress/integration/frontend/survey.spec.js @@ -1,5 +1,5 @@ -const schema = require('../fixtures/schema.json'); -const module = require('../fixtures/module.json'); +const schema = require('../../fixtures/schema.json'); +const module = require('../../fixtures/module.json'); describe('Survey', () => { beforeEach(() => { @@ -10,7 +10,7 @@ describe('Survey', () => { }); cy.viewport('macbook-15'); - cy.apolloLogin('rahel.cueni', 'test'); + cy.fakeLogin('rahel.cueni', 'test'); }); it('should display and fill out the survey', () => { @@ -46,14 +46,14 @@ describe('Survey', () => { answer, __typename: 'UpdateAnswerPayload' } - } + }; } } }); cy.visit('/survey/U3VydmV5Tm9kZTox'); - cy.get('.survey__panel-title').should('contain', 'Fall 1') + cy.get('.survey__panel-title').should('contain', 'Fall 1'); cy.get('#sq_100i').type('Wohlwollen'); cy.get('#sq_101i').type('Demut'); @@ -67,6 +67,6 @@ describe('Survey', () => { cy.visit('/survey/U3VydmV5Tm9kZTox'); - cy.get('#sq_100i').should('have.value', 'Wohlwollen') + cy.get('#sq_100i').should('have.value', 'Wohlwollen'); }); }); diff --git a/client/cypress/integration/sync-module-visibility.spec.js b/client/cypress/integration/frontend/sync-module-visibility.spec.js similarity index 96% rename from client/cypress/integration/sync-module-visibility.spec.js rename to client/cypress/integration/frontend/sync-module-visibility.spec.js index af91d95c..c62f503d 100644 --- a/client/cypress/integration/sync-module-visibility.spec.js +++ b/client/cypress/integration/frontend/sync-module-visibility.spec.js @@ -1,5 +1,5 @@ // import * as schema from '../fixtures/schema.json'; -import {getModules, getMe} from '../support/helpers'; +import {getModules, getMe} from '../../support/helpers'; const mocks = { UUID: () => 'Whatever',