Files
app/nextjs/cypress/integration/005apply.spec.js
T
tberrod cf7d4fc6bc
tt-app/app/Saga There was a failure building this commit
test
2019-09-20 14:56:36 +02:00

31 lines
1.2 KiB
JavaScript

describe('Apply to an offer', function() {
it('Go to an offer and apply to it', function() {
cy.viewport(375, 667)
cy.visit('/')
cy.get('.cypConnexionMenu').click()
cy.get('.cypConnexion').click({ force: true })
cy.url().should('contain', 'Login')
cy.get('.cypInputEmail input').type(Cypress.env('email'))
cy.get('.cypInputPassword input').type(Cypress.env('password'))
cy.get('.cypButtonConnexion').click().wait(3000)
cy.get('.cypButtonOffers').click().wait(3000)
cy.url().should('contain', 'Offres')
cy.get('.cypCardOffre').first().click().wait(3000)
cy.url().should('contain', 'Offre')
cy.get('.cypButtonApply').first().click().wait(3000)
cy.url().should('contain', 'Reponse')
cy.fixture('cypVid.mov', 'base64').then(fileContent => {
cy.get('.cypButtonImportVid').invoke('show').upload(
{ fileContent, fileName: 'cypVid.mov', mimeType: 'video/quicktime', encoding: 'base64' },
{ subjectType: 'input', force: true }
)}).wait(3000)
cy.get('.cypButtonSendApplication').click().wait(3000)
})
//Should verify if application is received
})