Shun Miyazawa 4 anos atrás
pai
commit
7700a5be50

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

@@ -12,7 +12,7 @@ const PagePresentationModal = () => {
   return (
     <Modal isOpen={presentationData.isOpened} toggle={closePresentationModal} className="grw-presentation-modal" unmountOnClose={false}>
       <ModalBody className="modal-body">
-        <iframe src={presentationData.href} data-testid="page-presentation-modal" />
+        <iframe src={presentationData.href} />
       </ModalBody>
     </Modal>
   );

+ 4 - 11
packages/app/test/cypress/integration/2-basic-features/open-presentation-modal.spec.ts

@@ -1,12 +1,5 @@
-const getIframeBody = () => {
-  return cy
-    .getByTestid('page-presentation-modal')
-    .its('0.contentDocument').should('exist')
-    .its('body').should('not.be.undefined')
-    .then(cy.wrap)
-};
-
 context('Open presentation modal', () => {
+
   const ssPrefix = 'access-to-presentation-modal-';
 
   let connectSid: string | undefined;
@@ -35,7 +28,7 @@ context('Open presentation modal', () => {
       cy.getByTestid('open-presentation-modal-btn').click({force: true})
     });
 
-    getIframeBody().find('slides').should('exist');
+    cy.getByTestid('.grw-presentation-modal').should('exist');
     cy.screenshot(`${ssPrefix}-opne-top`, { capture: 'viewport' });
   });
 
@@ -47,7 +40,7 @@ context('Open presentation modal', () => {
       cy.getByTestid('open-presentation-modal-btn').click({force: true})
     });
 
-    getIframeBody().find('slides').should('exist');
+    cy.getByTestid('.grw-presentation-modal').should('exist');
     cy.screenshot(`${ssPrefix}-open-bootstrap4`, { capture: 'viewport' });
   });
 
@@ -59,7 +52,7 @@ context('Open presentation modal', () => {
       cy.getByTestid('open-presentation-modal-btn').click({force: true})
     });
 
-    getIframeBody().find('slides').should('exist');
+    cy.getByTestid('.grw-presentation-modal').should('exist');
     cy.screenshot(`${ssPrefix}-open-bootstrap4-with-ancker-link`, { capture: 'viewport' });
   });
 });