skillbox/client/cypress/integration/frontend/sidebar.spec.js

28 lines
638 B
JavaScript

import {getMinimalMe} from '../../support/helpers';
describe('Sidebar', () => {
beforeEach(() => {
cy.setup();
});
it('should open sidebar and stay open', () => {
const operations = {
MeQuery: getMinimalMe({}),
ProjectsQuery: {
projects: []
}
};
cy.mockGraphqlOps({
operations
});
cy.visit('/portfolio');
cy.getByDataCy('sidebar').should('not.exist');
cy.getByDataCy('user-widget-avatar').click();
cy.getByDataCy('sidebar').should('exist');
cy.getByDataCy('close-profile-sidebar-link').click();
cy.getByDataCy('sidebar').should('not.exist');
});
});