Refactor some file locations

This commit is contained in:
Ramon Wenger 2021-03-16 15:11:03 +01:00
parent bdeef5323f
commit 59f98023d6
20 changed files with 46 additions and 43 deletions

View File

@ -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
}
}
}
});

View File

@ -1,6 +1,6 @@
import { GraphQLError } from 'graphql';
const schema = require('../../fixtures/schema.json');
const schema = require('../../../fixtures/schema.json');
describe('Email Verifcation', () => {
beforeEach(() => {

View File

@ -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';

View File

@ -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

View File

@ -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');
})
});
});

View File

@ -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(() => {

View File

@ -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');
});
});

View File

@ -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', () => {

View File

@ -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);

View File

@ -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');
});
});

View File

@ -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',