Yuki Takei 4 лет назад
Родитель
Сommit
921d085dc0
1 измененных файлов с 12 добавлено и 1 удалено
  1. 12 1
      packages/app/test/cypress/integration/2-basic-features/access-to-page.spec.ts

+ 12 - 1
packages/app/test/cypress/integration/2-basic-features/access-to-page.spec.ts

@@ -2,15 +2,26 @@ const ssPrefix = 'access-to-page-';
 
 
 context('Access to page', () => {
 context('Access to page', () => {
 
 
+  let connectSid: string | undefined;
+
   before(() => {
   before(() => {
     // login
     // login
     cy.fixture("user-admin.json").then(user => {
     cy.fixture("user-admin.json").then(user => {
       cy.login(user.username, user.password);
       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('/Sandbox is successfully loaded', () => {
   it('/Sandbox is successfully loaded', () => {
-    cy.visit('/Sandbox');
+    cy.visit('/Sandbox', {  });
     cy.screenshot(`${ssPrefix}-sandbox`, { capture: 'viewport' });
     cy.screenshot(`${ssPrefix}-sandbox`, { capture: 'viewport' });
   });
   });