Update sidebar test
This commit is contained in:
parent
ef6d76aee1
commit
66a0427183
|
|
@ -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');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue