kaori 3 лет назад
Родитель
Сommit
8f83859f43

+ 65 - 0
packages/app/test/cypress/integration/20-basic-features/access-to-modal.spec.ts

@@ -0,0 +1,65 @@
+context('Open Page Presentation Modal', () => {
+  const ssPrefix = 'access-to-modal-';
+
+  beforeEach(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+  });
+
+  it('PresentationModal is shown successfully', () => {
+    cy.visit('/Sandbox/Bootstrap4', {  });
+    cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('open-page-item-control-btn').click();
+      cy.getByTestid('open-presentation-modal-btn').click();
+   });
+
+    cy.getByTestid('page-presentation-modal').should('be.visible')
+    cy.screenshot(`${ssPrefix}-open-page-presentation-bootstrap4`);
+ });
+
+});
+
+// context('Move to Template Editing Mode', () => {
+//   const ssPrefix = 'access-to-modal-';
+
+//   beforeEach(() => {
+//     // login
+//     cy.fixture("user-admin.json").then(user => {
+//       cy.login(user.username, user.password);
+//     });
+//   });
+
+
+//   it('Moving to Template Editor mode for only child pages successfully', () => {
+//      cy.visit('/Sandbox/Bootstrap4', {  });
+//      cy.get('#grw-subnav-container').within(() => {
+//        cy.getByTestid('open-page-item-control-btn').click();
+//        cy.getByTestid('open-page-template-modal-btn').click();
+//     });
+
+//      cy.getByTestid('page-template-modal').should('be.visible')
+//      cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
+//      cy.getByTestid('template-button-children').click();
+//      cy.url().should('include', '/_template#edit');
+//      cy.screenshot();
+//   });
+
+//   it('Moving to Template Editor mode including decendants successfully', () => {
+//     cy.visit('/Sandbox/Bootstrap4', {  });
+//     cy.get('#grw-subnav-container').within(() => {
+//       cy.getByTestid('open-page-item-control-btn').click();
+//       cy.getByTestid('open-page-template-modal-btn').click();
+//    });
+
+//     cy.getByTestid('page-template-modal').should('be.visible')
+//     cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
+//     cy.getByTestid('template-button-decendants').click();
+//     cy.url().should('include', '/__template#edit');
+//     cy.screenshot();
+//  });
+
+// });
+
+

+ 44 - 0
packages/app/test/cypress/integration/20-basic-features/access-to-page.spec.ts

@@ -102,3 +102,47 @@ context('Access to special pages', () => {
   });
 
 });
+
+context('Access to Template Editing Mode', () => {
+  const ssPrefix = 'access-to-modal-';
+
+  beforeEach(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+    // collapse sidebar
+    cy.collapseSidebar(true);
+  });
+
+
+  it('Access to Template Editor mode for only child pages successfully', () => {
+     cy.visit('/Sandbox/Bootstrap4', {  });
+     cy.get('#grw-subnav-container').within(() => {
+       cy.getByTestid('open-page-item-control-btn').click();
+       cy.getByTestid('open-page-template-modal-btn').click();
+    });
+
+     cy.getByTestid('page-template-modal').should('be.visible')
+     cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
+     cy.getByTestid('template-button-children').click();
+     cy.url().should('include', '/_template#edit');
+     cy.screenshot();
+  });
+
+  it('Access to Template Editor mode including decendants successfully', () => {
+    cy.visit('/Sandbox/Bootstrap4', {  });
+    cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('open-page-item-control-btn').click();
+      cy.getByTestid('open-page-template-modal-btn').click();
+   });
+
+    cy.getByTestid('page-template-modal').should('be.visible')
+    // cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
+    cy.getByTestid('template-button-decendants').click();
+    cy.url().should('include', '/__template#edit');
+    cy.screenshot();
+ });
+
+});
+

+ 0 - 65
packages/app/test/cypress/integration/20-basic-features/moving-to-presentation-modal-and-templete-editor-mode.spec.ts

@@ -1,65 +0,0 @@
-context('Open Page Presentation Modal', () => {
-  const ssPrefix = 'access-to-modal-';
-
-  beforeEach(() => {
-    // login
-    cy.fixture("user-admin.json").then(user => {
-      cy.login(user.username, user.password);
-    });
-  });
-
-  it('PresentationModal is shown successfully', () => {
-    cy.visit('/Sandbox/Bootstrap4', {  });
-    cy.get('#grw-subnav-container').within(() => {
-      cy.getByTestid('open-page-item-control-btn').click();
-      cy.getByTestid('open-presentation-modal-btn').click();
-   });
-
-    cy.getByTestid('page-presentation-modal').should('be.visible')
-    cy.screenshot(`${ssPrefix}-open-page-presentation-bootstrap4`);
- });
-
-});
-
-context('Move to Template Editing Mode', () => {
-  const ssPrefix = 'access-to-modal-';
-
-  beforeEach(() => {
-    // login
-    cy.fixture("user-admin.json").then(user => {
-      cy.login(user.username, user.password);
-    });
-  });
-
-
-  it('Moving to Template Editor mode for only child pages successfully', () => {
-     cy.visit('/Sandbox/Bootstrap4', {  });
-     cy.get('#grw-subnav-container').within(() => {
-       cy.getByTestid('open-page-item-control-btn').click();
-       cy.getByTestid('open-page-template-modal-btn').click();
-    });
-
-     cy.getByTestid('page-template-modal').should('be.visible')
-     cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
-     cy.getByTestid('template-button-children').click();
-     cy.url().should('include', '/_template#edit');
-     cy.screenshot();
-  });
-
-  it('Moving to Template Editor mode including decendants successfully', () => {
-    cy.visit('/Sandbox/Bootstrap4', {  });
-    cy.get('#grw-subnav-container').within(() => {
-      cy.getByTestid('open-page-item-control-btn').click();
-      cy.getByTestid('open-page-template-modal-btn').click();
-   });
-
-    cy.getByTestid('page-template-modal').should('be.visible')
-    cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
-    cy.getByTestid('template-button-decendants').click();
-    cy.url().should('include', '/__template#edit');
-    cy.screenshot();
- });
-
-});
-
-