Update another cypress test

This commit is contained in:
Ramon Wenger 2021-08-16 22:40:57 +02:00
parent ca522d385b
commit 2878097729
3 changed files with 11 additions and 9 deletions

View File

@ -88,6 +88,7 @@ export default {
teaser: '',
intro: '',
assignments: {nodes: []},
objectiveGroups: [],
id: getModuleId(),
}),
TopicNode: () => ({

View File

@ -13,7 +13,7 @@ describe('New student', () => {
});
// todo: unskip me
it.skip('shows "Enter Code" page and adds the user to a class', () => {
it('shows "Enter Code" page and adds the user to a class', () => {
cy.apolloLogin('hansli', 'test');
const name = 'KF1A';
@ -47,7 +47,7 @@ describe('New student', () => {
cy.visit('/');
cy.get('[data-cy=join-form-title]').should('contain', 'Einer Klasse beitreten');
cy.get('[data-cy=input-form-code]').type('XXXX');
cy.get('[data-cy=join-code-input]').type('XXXX');
cy.get('[data-cy=join-form-confirm]').click();
cy.getByDataCy('onboarding-skip-link').click();
cy.get('[data-cy=user-widget-avatar]').click();

View File

@ -1,5 +1,5 @@
import getMe from '../../fixtures/me.minimal';
import module from '../../fixtures/module.minimal';
import {getMinimalMe} from '../../support/helpers';
const chapters = [{
title: 'ABC',
@ -15,27 +15,28 @@ const chapters = [{
}];
const operations = {
MeQuery: {
me: getMe(true),
},
MeQuery: getMinimalMe({isTeacher: true}),
ModuleDetailsQuery: {
module: {
...module,
chapters,
},
},
DeleteContentBlock: {
success: true,
},
UpdateLastModule: {}
};
describe('Custom Content Block', () => {
before(() => {
beforeEach(() => {
cy.setup();
});
it('Deletes the custom content block and removes it from the view', () => {
cy.fakeLogin('ross.geller', 'test');
cy.mockGraphqlOps({
operations,
});
cy.visit('module/some-module');
cy.log('Toggling Edit Mode');