Update cypress test
This commit is contained in:
parent
934ee977f6
commit
afb0b7131d
|
|
@ -3,17 +3,33 @@ import {getMinimalMe} from '../../../support/helpers';
|
|||
describe('The Rooms Page', () => {
|
||||
const getOperations = (isTeacher) => ({
|
||||
MeQuery: getMinimalMe({isTeacher}),
|
||||
RoomsQuery: {},
|
||||
RoomsQuery: {
|
||||
rooms: {
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
schoolClass: {
|
||||
id: 'selectedClassId',
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
cy.setup();
|
||||
});
|
||||
|
||||
it.only('shows the onboarding page', () => {
|
||||
it('shows the onboarding page', () => {
|
||||
const operations = getOperations(true);
|
||||
cy.mockGraphqlOps({
|
||||
operations,
|
||||
operations: {
|
||||
...operations,
|
||||
RoomsQuery: {}
|
||||
},
|
||||
});
|
||||
|
||||
cy.visit('/rooms');
|
||||
|
|
@ -32,6 +48,7 @@ describe('The Rooms Page', () => {
|
|||
|
||||
cy.visit('/rooms');
|
||||
|
||||
cy.getByDataCy('room-widget').should('have.length', 1);
|
||||
cy.get('[data-cy=add-room]').should('exist');
|
||||
});
|
||||
|
||||
|
|
@ -43,6 +60,7 @@ describe('The Rooms Page', () => {
|
|||
|
||||
cy.visit('/rooms');
|
||||
|
||||
cy.getByDataCy('room-widget').should('have.length', 1);
|
||||
cy.get('[data-cy=add-room]').should('not.exist');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue