Skip to content

Gx 32732 ✅ tools qa elements text box fill form and submit #468

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/CI-Suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
with:
browser: chrome
command: | #EDITAR AQUÍ EL ARCHIVO SUITE A EJECUTAR:
yarn file cypress/e2e/Tests/Interactions/GX2-5654-droppable.cy.js
yarn file cypress/e2e/Tests/Elements/GX-32732-textBoxFillFormSubmit.cy.js

- name: ✅Import Test Results to Xray
if: always()
Expand All @@ -64,8 +64,8 @@ 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: 'GX2-5656' #EDITAR AQUÍ EL TEST EXECUTION A IMPORTAR LAS PRUEBAS.
projectKey: 'GX2' #EDITAR EN CASO DE TRABAJAR CON OTRO PROYECTO.
testExecKey: 'GX-32734' #EDITAR AQUÍ EL TEST EXECUTION A IMPORTAR LAS PRUEBAS.
projectKey: 'GX' #EDITAR EN CASO DE TRABAJAR CON OTRO PROYECTO.

- name: 🔔Slack Notification of Done
if: always()
Expand Down
69 changes: 69 additions & 0 deletions cypress/e2e/Tests/Elements/GX-32732-textBoxFillFormSubmit.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { removeLogs } from '@helper/RemoveLogs';
removeLogs();

describe('GX-32732-✅-tools-qa-elements-text-box-fill-form-and-submit', () => {
beforeEach('Precondición: Usuario debe estar en el sut DemoQA', () => {
cy.visit('https://demoqa.com/text-box');
});
it('32733 | TC1: Validar poder completar el formulario con datos válidos', () => {
cy.fixture('data/GX-32732-yesiData').then(user => {
cy.get(user.fullName.input).type(user.fullName.data.valid);
cy.get(user.email.input).type(user.email.data.valid);
cy.get(user.currentAddress.input).type(user.currentAddress.data.valid);
cy.get(user.permanentAddress.input).type(user.permanentAddress.data.valid);
cy.get(user.bottonSubmit).click();
cy.get('#name').should('contain.text', user.fullName.data.valid);
cy.get('#email').should('contain.text', user.email.data.valid);
cy.get('#currentAddress.mb-1').should('contain.text', user.currentAddress.data.valid);
cy.get('#permanentAddress.mb-1').should('contain.text', user.permanentAddress.data.valid);
});
});
it('32733 | TC2: Validar poder enviar el formulario con los datos vacíos', () => {
cy.fixture('data/GX-32732-yesiData').then(user => {
cy.get(user.fullName.input).should('be.empty');
cy.get(user.email.input).should('be.empty');
cy.get(user.currentAddress.input).should('be.empty');
cy.get(user.permanentAddress.input).should('be.empty');
cy.get(user.bottonSubmit).click();
cy.get('#name').should('not.exist');
cy.get('#email').should('not.exist');
cy.get('#currentAddress.mb-1').should('not.exist');
cy.get('#permanentAddress.mb-1').should('not.exist');
});
});
it('32733 | TC3: Validar No poder enviar el formulario cuando email no tiene “@”', () => {
cy.fixture('data/GX-32732-yesiData').then(user => {
cy.get(user.email.input).type(user.email.data.invalid);
cy.get(user.bottonSubmit).click();
cy.get(user.email.input).should('have.class', 'field-error');
});
});
it('32733 | TC4: Validar No poder enviar el formulario cuando email no contiene 1 alphanumeric antes “@”', () => {
cy.fixture('data/GX-32732-yesiData').then(user => {
cy.get(user.email.input).type(user.email.data.invalid1);
cy.get(user.bottonSubmit).click();
cy.get(user.email.input).should('have.class', 'field-error');
});
});
it('32733 | TC5: Validar No poder enviar el formulario cuando email no contiene 1 alphanumeric despues“@”', () => {
cy.fixture('data/GX-32732-yesiData').then(user => {
cy.get(user.email.input).type(user.email.data.invalid2);
cy.get(user.bottonSubmit).click();
cy.get(user.email.input).should('have.class', 'field-error');
});
});
it('32733 | TC6: Validar No poder enviar el formulario cuando email no contiene 2 alphanumeric despues“.”', () => {
cy.fixture('data/GX-32732-yesiData').then(user => {
cy.get(user.email.input).type(user.email.data.invalid3);
cy.get(user.bottonSubmit).click();
cy.get(user.email.input).should('have.class', 'field-error');
});
});
it('32733 | TC7: Validar No poder enviar el formulario cuando email no contiene "." despues del 1 alphanumeric despues "@”', () => {
cy.fixture('data/GX-32732-yesiData').then(user => {
cy.get(user.email.input).type(user.email.data.invalid4);
cy.get(user.bottonSubmit).click();
cy.get(user.email.input).should('have.class', 'field-error');
});
});
});
36 changes: 36 additions & 0 deletions cypress/fixtures/data/GX-32732-yesiData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"fullName": {
"input": "#userName",
"data": {
"valid": "Yesi Windecker",
"empty": ""
}
},
"email": {
"input": "#userEmail",
"data": {
"valid": "[email protected]",
"invalid": "ywindecker.gmail.com",
"invalid1": "@gmail.com",
"invalid2": "ywindecker@",
"invalid3": "[email protected]",
"invalid4": "ywindecker@1",
"empty": ""
}
},
"currentAddress": {
"input": "#currentAddress",
"data": {
"valid": "Las Magnolias 1260",
"empty": ""
}
},
"permanentAddress": {
"input": "#permanentAddress",
"data": {
"valid": "Ciudad de México",
"empty": ""
}
},
"bottonSubmit": "#submit"
}
73 changes: 73 additions & 0 deletions cypress/test-plan/in-sprint/sprint-25/GX-32732.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
### Link US : https://upexgalaxy24.atlassian.net/browse/GX-32732

### Sprint: _Galaxy🚀Sprint #25🪶_

### QA deberá: Realizar una cobertura completa de testing del formulario, con sus aserciones.

## Deberá de utilizar fixture para la entrada de datos estaticos fixture | Cypress Documentation

## As a QA learner,

_Description_:

## _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.

### ✅ACCEPTANCE CRITERIA

- (This feature doesn’t need BDD AC - Please take a look into the BRS tab)

## 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.

## ⛳SCOPE

**_Only Page: https://demoqa.com/text-box_ **

## 🏴‍☠️OOS

**Other Pages**