diff --git a/cypress.json b/cypress.json index 524120270..a7255ee4a 100644 --- a/cypress.json +++ b/cypress.json @@ -1,8 +1,9 @@ { - "viewportWidth": 1280, - "viewportHeight": 720, - "video": true, - "screenshotsFolder": "cypress/screenshots", - "videosFolder": "cypress/videos", - "integrationFolder": "cypress/integration" - } \ No newline at end of file + "viewportWidth": 1280, + "viewportHeight": 720, + "video": true, + "screenshotsFolder": "cypress/screenshots", + "videosFolder": "cypress/videos", + "integrationFolder": "cypress/integration", + "supportFile": "cypress/support/integration.js" +} \ No newline at end of file diff --git a/cypress/integration/Specs/CAC-TAT.cy.js b/cypress/integration/Specs/CAC-TAT.cy.js index 7c693c4d3..427edae4b 100644 --- a/cypress/integration/Specs/CAC-TAT.cy.js +++ b/cypress/integration/Specs/CAC-TAT.cy.js @@ -91,7 +91,7 @@ describe('Central de Atendimento ao Cliente TAT', function() { }) it('Envia formulário com sucesso usando comando customizado', function(){ - cy.fillMandatoryFieldsAndSubmit() + cy.fillMandatoryFields///AndSubmit() cy.get('.success').should('be.visible') }) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 15bf4448b..c2dd1738b 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -23,10 +23,10 @@ // // -- This will overwrite an existing command -- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) -Cypress.Commands.add('fillMandatoryFieldsAndSubmit', function(){ - cy.get('#firstName').type('Willian') - cy.get('#lastName').type('de Souza Silva') - cy.get('#email').type('williandesouza3@gmail.com') - cy.get('#open-text-area').type('Teste') - cy.contains('button', 'Enviar').click() -}) \ No newline at end of file +Cypress.Commands.add('fillMandatoryFieldsAndSubmit', () => { + cy.get('#firstName').type('John') + cy.get('#lastName').type('Doe') + cy.get('#email').type('john.doe@example.com') + cy.get('#open-text-area').type('teste') + cy.get('button[type="submit"]').click() +}) \ No newline at end of file diff --git a/cypress/support/e2e.js b/cypress/support/integration.js similarity index 100% rename from cypress/support/e2e.js rename to cypress/support/integration.js