|
|
@@ -1,3 +1,10 @@
|
|
|
+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-';
|
|
|
@@ -28,7 +35,7 @@ context('Open presentation modal', () => {
|
|
|
cy.getByTestid('open-presentation-modal-btn').click({force: true})
|
|
|
});
|
|
|
|
|
|
- cy.get('.grw-presentation-modal').should('be.visible')
|
|
|
+ getIframeBody().find('slides').should('exist');
|
|
|
cy.screenshot(`${ssPrefix}-opne-top`, { capture: 'viewport' });
|
|
|
});
|
|
|
|
|
|
@@ -40,7 +47,7 @@ context('Open presentation modal', () => {
|
|
|
cy.getByTestid('open-presentation-modal-btn').click({force: true})
|
|
|
});
|
|
|
|
|
|
- cy.get('.grw-presentation-modal').should('be.visible')
|
|
|
+ getIframeBody().find('slides').should('exist');
|
|
|
cy.screenshot(`${ssPrefix}-open-bootstrap4`, { capture: 'viewport' });
|
|
|
});
|
|
|
|
|
|
@@ -52,7 +59,7 @@ context('Open presentation modal', () => {
|
|
|
cy.getByTestid('open-presentation-modal-btn').click({force: true})
|
|
|
});
|
|
|
|
|
|
- cy.get('.grw-presentation-modal').should('be.visible')
|
|
|
+ getIframeBody().find('slides').should('exist');
|
|
|
cy.screenshot(`${ssPrefix}-open-bootstrap4-with-ancker-link`, { capture: 'viewport' });
|
|
|
});
|
|
|
});
|