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', () => {
|
it('should open sidebar and stay open', () => {
|
||||||
|
const {me} = getMinimalMe({});
|
||||||
const operations = {
|
const operations = {
|
||||||
MeQuery: getMinimalMe({}),
|
MeQuery: {
|
||||||
|
me: {
|
||||||
|
...me,
|
||||||
|
schoolClasses: {
|
||||||
|
edges: [
|
||||||
|
...me.schoolClasses.edges,
|
||||||
|
{node: {}},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ProjectsQuery: {
|
ProjectsQuery: {
|
||||||
projects: []
|
projects: [],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
cy.mockGraphqlOps({
|
cy.mockGraphqlOps({
|
||||||
operations
|
operations,
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.visit('/portfolio');
|
cy.visit('/portfolio');
|
||||||
cy.getByDataCy('sidebar').should('not.exist');
|
cy.getByDataCy('sidebar').should('not.exist');
|
||||||
cy.getByDataCy('user-widget-avatar').click();
|
cy.getByDataCy('user-widget-avatar').click();
|
||||||
cy.getByDataCy('sidebar').should('exist');
|
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('close-profile-sidebar-link').click();
|
||||||
cy.getByDataCy('sidebar').should('not.exist');
|
cy.getByDataCy('sidebar').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue