Added cypress test to test embedded mode

This commit is contained in:
Przemek Wiech 2020-05-09 01:10:43 +02:00
parent f2e3120dc9
commit 7e0a72b3e9
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,6 @@
{
"viewportWidth": 1280,
"viewportHeight": 1024,
"chromeWebSecurity": false,
"baseUrl": "http://localhost:3000/#"
}

View File

@ -0,0 +1,11 @@
describe('Embedded mode', () => {
it('shows data', () => {
const url = 'https://pewu.github.io/topola-embedded/#' + Cypress.config('baseUrl');
cy.visit(url);
cy.get('iframe')
.its('0.contentDocument.body').should('not.be.empty')
.then(cy.wrap)
.find('#root')
.contains('Bonifacy');
});
});