LuqmanHakim-Grune пре 4 година
родитељ
комит
028123767b

+ 0 - 28
packages/app/test/cypress/integration/5-switch-cyber-mode/cyber-mode-switching.ts

@@ -1,28 +0,0 @@
-context('Cyber mode switching', () => {
-  const ssPrefix = 'cyber-mode-switching-';
-
-  let connectSid: string | undefined;
-
-  before(() => {
-    // login
-    cy.fixture("user-admin.json").then(user => {
-      cy.login(user.username, user.password);
-    });
-    cy.getCookie('connect.sid').then(cookie => {
-      connectSid = cookie?.value;
-    });
-    // collapse sidebar
-    cy.collapseSidebar(true);
-  });
-
-  beforeEach(() => {
-    if (connectSid != null) {
-      cy.setCookie('connect.sid', connectSid);
-    }
-  });
-
-  it('Switching cyber mode at header', () => {
-
-  });
-
-});

+ 33 - 0
packages/app/test/cypress/integration/5-switch-sidebar-mode/switching-sidebar-mode.spec.ts

@@ -0,0 +1,33 @@
+context('Switch sidebar mode', () => {
+  const ssPrefix = 'switch-sidebar-mode-';
+
+  let connectSid: string | undefined;
+
+  before(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+    cy.getCookie('connect.sid').then(cookie => {
+      connectSid = cookie?.value;
+    });
+  });
+
+  beforeEach(() => {
+    if (connectSid != null) {
+      cy.setCookie('connect.sid', connectSid);
+    }
+  });
+
+  it('Switching sidebar mode', () => {
+    cy.visit('/');
+    cy.get('.grw-personal-dropdown').click();
+
+    cy.get('[for="swSidebarModeOnEditor"]').click();
+    cy.screenshot(`${ssPrefix}-switch-sidebar-mode`, { capture: 'viewport' });
+
+    cy.get('[for="swSidebarModeOnEditor"]').click();
+    cy.screenshot(`${ssPrefix}-switch-sidebar-mode-back`, { capture: 'viewport' });
+  });
+
+});