asami-n 4 tahun lalu
induk
melakukan
8d25abbfb3

+ 0 - 39
packages/app/test/cypress/integration/2-basic-features/bootstrap4-open-delete-modal.spec.ts

@@ -1,39 +0,0 @@
-context('Open Page Delete Modal', () => {
-
-  const ssPrefix = 'bootstrap4-open-delete-modal-';
-
-  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);
-      cy.visit('/');
-    }
-  });
-
-  it('PageDeleteModal is shown successfully', () => {
-     cy.visit('/Sandbox/Bootstrap4', {  });
-     cy.get('#grw-subnav-container').within(() => {
-       cy.getByTestid('open-page-item-control-btn').click();
-       cy.getByTestid('open-page-delete-modal-btn').click();
-    });
-
-     // eslint-disable-next-line cypress/no-unnecessary-waiting
-     cy.wait(1500);
-     cy.screenshot(`${ssPrefix}-bootstrap4`,{ capture: 'viewport' });
-  });
-
-});
-

+ 14 - 22
packages/app/test/cypress/integration/2-basic-features/open-page-delete-modal.spec.ts

@@ -1,6 +1,6 @@
+context('Open Page Delete Modal', () => {
 
-context('Access to page', () => {
-  const ssPrefix = 'open-page-create-modal-';
+  const ssPrefix = 'access-to-page-delete-modal-';
 
   let connectSid: string | undefined;
 
@@ -19,29 +19,21 @@ context('Access to page', () => {
   beforeEach(() => {
     if (connectSid != null) {
       cy.setCookie('connect.sid', connectSid);
+      cy.visit('/');
     }
   });
 
-  it('/Sandbox is successfully loaded', () => {
-    cy.visit('/Sandbox', {  });
-    cy.screenshot(`${ssPrefix}-Sandbox`,{ capture: 'viewport' });
-  });
-
-  // it('PageDeleteModal is shown successfully', () => {
-    // cy.visit('/Sandbox');
-    // cy.getByTestid('open-page-item-control-btn')[0].click();
-    // cy.contains('Delete').click();
-    // cy.screenshot(`${ssPrefix}-open`,{ capture: 'viewport' });
-
-
-  // });
-  // it('PageDeleteModal Search is shown successfully', () => {
-  //   cy.visit('/_search?q=tag:we');
-  //   cy.getByTestid('open-page-item-control-btn')[0].click();
-  //   cy.contains('Delete').click();
-  //   cy.screenshot(`${ssPrefix}_search?q=tag:we`,{ capture: 'viewport' });
-
+  it('PageDeleteModal is shown successfully', () => {
+     cy.visit('/Sandbox/Bootstrap4', {  });
+     cy.get('#grw-subnav-container').within(() => {
+       cy.getByTestid('open-page-item-control-btn').click();
+       cy.getByTestid('open-page-delete-modal-btn').click();
+    });
 
-  // });
+     // eslint-disable-next-line cypress/no-unnecessary-waiting
+     cy.wait(1500);
+     cy.screenshot(`${ssPrefix}-open-bootstrap4`,{ capture: 'viewport' });
+  });
 
 });
+