31 lines
1.2 KiB
JavaScript
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
|
|
}) |