Update e2e test schema
This commit is contained in:
parent
65b25ed488
commit
ef5c1c6279
|
|
@ -15,6 +15,7 @@
|
||||||
},
|
},
|
||||||
"onboardingVisited": false,
|
"onboardingVisited": false,
|
||||||
"__typename": "UserNode",
|
"__typename": "UserNode",
|
||||||
"permissions": []
|
"permissions": [],
|
||||||
|
"team": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,16 @@ const schema = require('../../fixtures/schema.json');
|
||||||
const me = require('../../fixtures/me.new-student.json');
|
const me = require('../../fixtures/me.new-student.json');
|
||||||
|
|
||||||
describe('New student', () => {
|
describe('New student', () => {
|
||||||
it('shows "Enter Code" page and adds the user to a class', () => {
|
before(() => {
|
||||||
cy.server();
|
cy.server();
|
||||||
|
cy.task('getSchema').then(schema => {
|
||||||
cy.mockGraphql({
|
cy.mockGraphql({
|
||||||
schema: schema,
|
schema,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('shows "Enter Code" page and adds the user to a class', () => {
|
||||||
cy.apolloLogin('hansli', 'test');
|
cy.apolloLogin('hansli', 'test');
|
||||||
|
|
||||||
const __typename = 'SchoolClassNode';
|
const __typename = 'SchoolClassNode';
|
||||||
|
|
@ -26,9 +29,9 @@ describe('New student', () => {
|
||||||
schoolClass: {
|
schoolClass: {
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
__typename
|
__typename,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
MySchoolClassQuery: {
|
MySchoolClassQuery: {
|
||||||
me: {
|
me: {
|
||||||
|
|
@ -37,12 +40,12 @@ describe('New student', () => {
|
||||||
__typename,
|
__typename,
|
||||||
name,
|
name,
|
||||||
id,
|
id,
|
||||||
members: []
|
members: [],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
...mockUpdateOnboardingProgress()
|
...mockUpdateOnboardingProgress(),
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue