Update e2e test schema

This commit is contained in:
Ramon Wenger 2021-03-25 20:33:50 +01:00
parent 65b25ed488
commit ef5c1c6279
2 changed files with 17 additions and 13 deletions

View File

@ -15,6 +15,7 @@
},
"onboardingVisited": false,
"__typename": "UserNode",
"permissions": []
"permissions": [],
"team": null
}
}

View File

@ -4,13 +4,16 @@ 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', () => {
before(() => {
cy.server();
cy.mockGraphql({
schema: schema,
cy.task('getSchema').then(schema => {
cy.mockGraphql({
schema,
});
});
});
it('shows "Enter Code" page and adds the user to a class', () => {
cy.apolloLogin('hansli', 'test');
const __typename = 'SchoolClassNode';
@ -26,9 +29,9 @@ describe('New student', () => {
schoolClass: {
id,
name,
__typename
}
}
__typename,
},
},
},
MySchoolClassQuery: {
me: {
@ -37,12 +40,12 @@ describe('New student', () => {
__typename,
name,
id,
members: []
}
}
members: [],
},
},
},
...mockUpdateOnboardingProgress()
}
...mockUpdateOnboardingProgress(),
},
});
cy.visit('/');