Ajoute un test end to end pour l'integration de l'iframe

pull/339/head
Johan Girod 2018-09-06 15:25:46 +02:00
parent a0d9d63c13
commit c84fa88759
3 changed files with 16 additions and 1 deletions

View File

@ -1,2 +1,3 @@
globals:
cy: false
Cypress: false

View File

@ -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')
})
})

View File

@ -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() {