diff --git a/client/cypress/integration/frontend/sidebar.spec.js b/client/cypress/integration/frontend/sidebar.spec.js index b4802f59..9163015f 100644 --- a/client/cypress/integration/frontend/sidebar.spec.js +++ b/client/cypress/integration/frontend/sidebar.spec.js @@ -6,21 +6,34 @@ describe('Sidebar', () => { }); it('should open sidebar and stay open', () => { + const {me} = getMinimalMe({}); const operations = { - MeQuery: getMinimalMe({}), + MeQuery: { + me: { + ...me, + schoolClasses: { + edges: [ + ...me.schoolClasses.edges, + {node: {}}, + ], + }, + }, + }, ProjectsQuery: { - projects: [] - } + projects: [], + }, }; cy.mockGraphqlOps({ - operations + operations, }); cy.visit('/portfolio'); cy.getByDataCy('sidebar').should('not.exist'); cy.getByDataCy('user-widget-avatar').click(); cy.getByDataCy('sidebar').should('exist'); + cy.getByDataCy('class-selection').click(); + cy.getByDataCy('class-selection-entry').should('have.length', 2); cy.getByDataCy('close-profile-sidebar-link').click(); cy.getByDataCy('sidebar').should('not.exist'); });