diff --git a/cypress/integration/.eslintrc.yaml b/cypress/integration/.eslintrc.yaml index bd8da2fec..e5a3c1494 100644 --- a/cypress/integration/.eslintrc.yaml +++ b/cypress/integration/.eslintrc.yaml @@ -1,2 +1,3 @@ globals: cy: false + Cypress: false diff --git a/cypress/integration/embauche/iframe.js b/cypress/integration/embauche/iframe.js new file mode 100644 index 000000000..a39e6c5d6 --- /dev/null +++ b/cypress/integration/embauche/iframe.js @@ -0,0 +1,14 @@ +Cypress.Commands.add('iframe', { prevSubject: 'element' }, $iframe => { + return new Cypress.Promise(resolve => { + setTimeout(() => resolve($iframe.contents().find('body')), 5000) + }) +}) + +describe('Iframe integration test', function() { + it('should display an iframe of the simulateur', function() { + cy.visit('/integration-test') + cy.get('iframe') + .iframe() + .contains('Entrez un salaire mensuel') + }) +}) diff --git a/cypress/integration/embauche/landing.js b/cypress/integration/embauche/landing.js index 18fd540ba..c7f81ef38 100644 --- a/cypress/integration/embauche/landing.js +++ b/cypress/integration/embauche/landing.js @@ -7,7 +7,7 @@ const salaryInput = inputTitle => { return inputContainer.find('input') } describe('Landing basic test', function() { - it('should not crash when entering salary', function() { + it('should not crash', function() { cy.visit('/') }) it('should display the simulateur after loading', function() {