Răsfoiți Sursa

Create access to side bar spec

https://youtrack.weseek.co.jp/issue/GW-7735
- Create test for show / collapse sidebar
- Create test for change side bar size in recent changes
mudana 3 ani în urmă
părinte
comite
61547b6d1b

+ 26 - 0
packages/app/test/cypress/integration/20-basic-features/access-to-side-bar.spec.ts

@@ -0,0 +1,26 @@
+context('Access to sidebar', () => {
+  const ssPrefix = 'access-to-sidebar-';
+
+  beforeEach(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+    // collapse sidebar
+    cy.collapseSidebar(false);
+  });
+
+  it('Successfully show/collapse sidebar', () => {
+    cy.visit('/');
+    cy.screenshot(`${ssPrefix}1-sidebar-shown`, {capture: 'viewport'});
+    cy.getByTestid('grw-navigation-resize-button').click({force: true});
+    cy.screenshot(`${ssPrefix}2-sidebar-collapsed`, {capture: 'viewport'});
+
+  });
+
+  it('Successully change side bar size of latest changes', () => {
+    cy.visit('/');
+    cy.getByTestid('grw-navigation-resize-button').click({force: true});
+    cy.getByTestid('grw-sidebar-nav-primary-recent-changes').click();
+  });
+});