Răsfoiți Sursa

VRT notification

https://youtrack.weseek.co.jp/issue/GW-7728
- Unify implementation of `before` into `beforeEach`
- Replace cy.wait() with .should('be.visible')
- Modify spec-group in workflow
mudana 3 ani în urmă
părinte
comite
72f3af4e0d

+ 1 - 1
.github/workflows/reusable-app-prod.yml

@@ -180,7 +180,7 @@ jobs:
       fail-fast: false
       matrix:
         # List string expressions that is comma separated ids of tests in "test/cypress/integration"
-        spec-group: ['10', '20', '21', '30', '40', '60']
+        spec-group: ['10', '20', '21', '30', '40', '60', '80']
 
     services:
       mongodb:

+ 5 - 14
packages/app/test/cypress/integration/80-notification/confirm-notification.spec.ts

@@ -2,22 +2,13 @@
 context('Confirm notification', () => {
   const ssPrefix = 'confirm-notification-';
 
-  let connectSid: string | undefined;
-
-  before(() => {
+  beforeEach(() => {
     // 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);
-    }
+    // collapse sidebar
+    cy.collapseSidebar(true);
   });
 
   it('Confirm notification', () => {
@@ -25,13 +16,13 @@ context('Confirm notification', () => {
     cy.get('.notification-wrapper > a').click();
     cy.get('.notification-wrapper > .dropdown-menu > a').click();
 
-    cy.wait(1500);
+    cy.get('#all-in-app-notifications').should('be.visible');
 
     cy.screenshot(`${ssPrefix}-see-all`, { capture: 'viewport' });
 
     cy.get('#all-in-app-notifications ul.nav-title li:eq(1) a').click();
 
-    cy.wait(500);
+    cy.get('.tab-pane.active > .justify-content-end > button').should('be.visible');
 
     cy.screenshot(`${ssPrefix}-see-unread`, { capture: 'viewport' });
   });