asami-n 4 лет назад
Родитель
Сommit
1f68368387

+ 8 - 1
packages/app/src/components/PagePresentationModal.jsx

@@ -5,12 +5,19 @@ import {
 
 import { usePagePresentationModal } from '~/stores/modal';
 
+// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
 const PagePresentationModal = () => {
 
   const { data: presentationData, close: closePresentationModal } = usePagePresentationModal();
 
   return (
-    <Modal isOpen={presentationData.isOpened} toggle={closePresentationModal} className="grw-presentation-modal" unmountOnClose={false}>
+    <Modal
+      isOpen={presentationData.isOpened}
+      toggle={closePresentationModal}
+      data-testid="page-presentation-modal"
+      className="grw-presentation-modal"
+      unmountOnClose={false}
+    >
       <ModalBody className="modal-body">
         <iframe src={presentationData.href} />
       </ModalBody>

+ 13 - 11
packages/app/test/cypress/integration/2-basic-features/open-page-create-edit-template-modal.spec.ts

@@ -23,23 +23,25 @@ context('Open Page presentation Template Modal', () => {
   });
 
 
-  it('PresentationModal for is shown successfully', () => {
+  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-btn').should('be.visible').screenshot(`${ssPrefix}-open-page-presentation-bootstrap4`);
+    cy.getByTestid('page-presentation-modal').should('be.visible')
+    cy.screenshot(`${ssPrefix}-open-page-presentation-bootstrap4`);
  });
-  // it('CreateEditTemplatePage 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-template-modal-btn').click();
-  //   });
-
-  //    cy.getByTestid('page-template-modal').should('be.visible').screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
-  // });
+  it('CreateEditTemplatePage 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-template-modal-btn').click();
+    });
+
+     cy.getByTestid('page-template-modal').should('be.visible')
+     cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
+  });
 
 });