Skip to content

✅[QA REGRESSION PASSED]: Ready to Merge into MAIN #584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 4, 2024
4 changes: 2 additions & 2 deletions .github/workflows/CI-Suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
with:
browser: electron
command: | #EDITAR AQUÍ EL ARCHIVO SUITE A EJECUTAR:
yarn file cypress/e2e/Tests/Elements/GX3-865-Buttons.cy.js
yarn file cypress/e2e/Tests/Elements/GX3-798-TextBox-Fill-form-and-Submit.cy.js

- name: ✅Import Test Results to Xray
if: always()
Expand All @@ -65,7 +65,7 @@ jobs:
password: ${{secrets.XRAY_CLIENT_SECRET}}
testFormat: 'junit' #OPCIONES PARA CAMBIAR: 'junit' (para xml) o 'cucumber' (para json)
testPaths: 'reports/test-results.xml' #OPCIONES: '/test-results.xml' o 'cucumber-report.json'
testExecKey: "GX3-1099" #tools-qa-elements-radio-buttons.
testExecKey: "GX3-805" #tools-qa-elements-radio-buttons.
projectKey: 'GX3' #EDITAR EN CASO DE TRABAJAR CON OTRO PROYECTO.

- name: 🔔Slack Notification of Done
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
describe('GX3-798 | TS: ToolsQA | Elements | Text Box', () => {
// ARRANGE
beforeEach('', () => {
cy.visit('https://demoqa.com/text-box');
cy.url().should('contain', 'text-box');
});

//casos
it('799|TC1: Validar que se realiza el envio exitoso cuando los datos son ingresados correctamente', () => {
//constantes
const jUserName = 'Janetzi';
const jUserEmails = '[email protected]';
const jCurrentAddress = 'Direccion principal';
const jPermanentAddress = 'Direccion secundaria';
//steps
cy.get('input#userName').type(jUserName);
cy.get('input#userEmail').type(jUserEmails);
cy.get('textarea#currentAddress').type(jCurrentAddress);
cy.get('textarea#permanentAddress').type(jPermanentAddress);
cy.get('#submit').click();

//Assertion
cy.get('p#name').should('contains.text', jUserName);
cy.get('p#email').should('contains.text', jUserEmails);
cy.get('p#currentAddress').should('contains.text', jCurrentAddress);
cy.get('p#permanentAddress').should('contains.text', jPermanentAddress);
});

it('799|TC2: Validar que se realiza el envio exitoso cuando solo el campo emails tiene un valor valido el resto de los campos es vacio', () => {
const jEmail02 = '[email protected]';

cy.get('input#userName').should('be.empty');
cy.get('input#userEmail').type(jEmail02);
cy.get('textarea#currentAddress').should('be.empty');
cy.get('textarea#permanentAddress').should('be.empty');
cy.get('#submit').click();

//Assertion
cy.get('p#email').should('contains.text', jEmail02);
});

it('799|TC3: Validar que el envio es fallido cuando el campo email no contiene @.', () => {
//const
const jEmail03 = 'janetzigmail.com';
//steps
cy.get('input#userEmail').type(jEmail03);
cy.get('#submit').click();

//Assertion
cy.get('input.mr-sm-2.field-error').should('be.enabled');
});

it('799|TC4: Validar que el envio es fallido cuando el campo email No contiene (mínimo) 1 carácter alfanumérico antes de @', () => {
const jEmail04 = 'janetzi@';
//steps
cy.get('input#userEmail').type(jEmail04);
cy.get('#submit').click();

//Assertion
cy.get('input.mr-sm-2.field-error').should('be.enabled');
});

it('799|TC5: Validar que el envio es fallido cuando el campo email No contiene (mínimo) 1 carácter alfanumérico después de @', () => {
const jEmail05 = '@gmail.com';
//steps
cy.get('input#userEmail').type(jEmail05);
cy.get('#submit').click();

//Assertion
cy.get('input.mr-sm-2.field-error').should('be.enabled');
});

it('799|TC6: Validar que el envio es fallido cuando el campo email No contiene "." después: 1 carácter alfanumérico después de @', () => {
const jEmail06 = '@gmailcom';
//steps
cy.get('input#userEmail').type(jEmail06);
cy.get('#submit').click();

//Assertion
cy.get('input.mr-sm-2.field-error').should('be.enabled');
});

it('799|TC7: Validar que el envio es fallido cuando el campo email No contiene (mínimo) 2 caracteres alfanuméricos después de .', () => {
const jEmail07 = '.com';
//steps
cy.get('input#userEmail').type(jEmail07);
cy.get('#submit').click();

//Assertion
cy.get('input.mr-sm-2.field-error').should('be.enabled');
});
});
13 changes: 13 additions & 0 deletions cypress/test-plan/in-sprint/sprint-30/GX3-798.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
As a QA learner, I want to test: filling out a form with: Full Name Email Current Address Permanent Address And Submit it. So that I can improve my
testing skills for this scenario.

🚩BUSINESS RULES SPEC For: “Full Name”, “Current Address” and “Permanent Address” These fields can be empty or filled. IF field is empty = No log
message is displayed after submitting. IF field is filled = String is displayed below as a paragraph after submitting. For: “Email” This field can be
invalid, empty or filled.

This field is invalid when: Does not contain “@” Does not contain (minimum) 1 alphanumeric character before “@” Does not contain (minimum) 1
alphanumeric character after “@” Does not contain “.” after: 1 alphanumeric character after “@”. Does not contain (minimum) 2 alphanumeric characters
after “.” Mockup: “[email protected]

IF field is invalid = class="mr-sm-2 field-error form-control" is displayed as a red border. IF field is empty = No log message is displayed after
submitting. IF field is filled = String is displayed below as a paragraph after submitting.