Skip to content

Commit 0164b00

Browse files
Merge pull request #402 from upex-galaxy/GX-24109-✅-tools-qa-elements-text-box-fill-form-and-submit
Merge GX-24109 into QA
2 parents 8cf5fc1 + 4230698 commit 0164b00

File tree

4 files changed

+176
-2
lines changed

4 files changed

+176
-2
lines changed

.github/workflows/CI-Suite.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
browser: chrome
5656
command: | #EDITAR AQUÍ EL ARCHIVO SUITE A EJECUTAR:
57-
yarn file cypress/e2e/Tests/Widgets/GX-23674-Dropdown.cy.js
57+
yarn file cypress/e2e/Tests/Elements/GX-24109-TextBoxFormAndSubmit.cy.js
5858
5959
- name: ✅Import Test Results to Xray
6060
if: always()
@@ -64,7 +64,7 @@ jobs:
6464
password: ${{secrets.XRAY_CLIENT_SECRET}}
6565
testFormat: 'junit' #OPCIONES PARA CAMBIAR: 'junit' (para xml) o 'cucumber' (para json)
6666
testPaths: 'reports/test-results.xml' #OPCIONES: '/test-results.xml' o 'cucumber-report.json'
67-
testExecKey: 'GX-23679' #EDITAR AQUÍ EL TEST EXECUTION A IMPORTAR LAS PRUEBAS.
67+
testExecKey: 'GX-24111' #EDITAR AQUÍ EL TEST EXECUTION A IMPORTAR LAS PRUEBAS.
6868
projectKey: 'GX' #EDITAR EN CASO DE TRABAJAR CON OTRO PROYECTO.
6969

7070
- name: 🔔Slack Notification of Done
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
describe(' GX-24109 | ✅ToolsQA | Elements | Text Box: Fill form and Submit', () => {
2+
beforeEach('PRC: Ingresar a la página', () => {
3+
cy.visit('/text-box');
4+
});
5+
6+
it('GX-24109 | TC1: Validar el funcionamiento del formulario al completarlo con datos correctos.', () => {
7+
cy.fixture('data/GX-24109-TextBoxForm').then(the => {
8+
cy.get(the.FullName.input).type(the.FullName.data.valid); //campo nombre completo lleno
9+
cy.get(the.FullName.input).should('have.value', the.FullName.data.valid);
10+
cy.get(the.CurrentAddress.input).type(the.CurrentAddress.data.valid); //campo direccion actual lleno
11+
cy.get(the.CurrentAddress.input).should('have.value', the.CurrentAddress.data.valid);
12+
cy.get(the.PermanentAddress.input).type(the.PermanentAddress.data.valid); //campo permanente actual lleno
13+
cy.get(the.PermanentAddress.input).should('have.value', the.PermanentAddress.data.valid);
14+
cy.get(the.SubmitButton).click(); //click en boton
15+
cy.get('#name').should('have.text', 'Name:NataliaPedraza');
16+
cy.get('#currentAddress').should('have.value', the.CurrentAddress.data.valid);
17+
cy.get('#permanentAddress').should('have.value', the.PermanentAddress.data.valid);
18+
});
19+
});
20+
21+
it('GX-24109 |TC2: Validar el no funcionamiento del formulario al quedar sus campos vacíos.', () => {
22+
cy.fixture('data/GX-24109-TextBoxForm').then(the => {
23+
cy.get(the.FullName.input).should('be.empty'); //campo nombre completo vacio
24+
cy.get(the.CurrentAddress.input).should('be.empty'); //campo direccion actual vacio
25+
cy.get(the.PermanentAddress.input).should('be.empty'); //campo permanente actual vacio
26+
cy.get(the.SubmitButton).click(); //click en boton
27+
});
28+
});
29+
30+
it('GX-24109 | TC3: Validar el funcionamiento del campo del correo electrónico. ', () => {
31+
cy.fixture('data/GX-24109-TextBoxForm').then(the => {
32+
cy.get(the.Email.input).type(the.Email.data.valid); //campo email valido
33+
cy.get(the.Email.input).should('have.value', the.Email.data.valid);
34+
cy.get(the.SubmitButton).click(); //click en boton
35+
cy.get('#email').should('have.text', 'Email:[email protected]');
36+
});
37+
});
38+
39+
it('GX-24109 | TC4: Validar el no funcionamiento del input correo electrónico si el mismo no tiene @.', () => {
40+
cy.fixture('data/GX-24109-TextBoxForm').then(the => {
41+
cy.get(the.Email.input).type(the.Email.data.invalid1); //no contiene @.
42+
cy.get(the.Email.input).should('have.value', the.Email.data.invalid1);
43+
cy.get(the.SubmitButton).click(); //click en boton
44+
cy.get(the.Email.input).should('have.css', 'border-color', 'rgb(255, 0, 0)');
45+
cy.get(the.Email.input).should('have.class', 'field-error');
46+
});
47+
});
48+
49+
it('GX-24109 | TC5: Validar el no funcionamiento del input correo electrónico si el mismo no tiene (mínimo) 1 carácter alfanumérico antes de “@” .', () => {
50+
cy.fixture('data/GX-24109-TextBoxForm').then(the => {
51+
cy.get(the.Email.input).type(the.Email.data.invalid2); //no contiene (mínimo) 1 carácter alfanumérico antes de “@” .
52+
cy.get(the.Email.input).should('have.value', the.Email.data.invalid2);
53+
cy.get(the.SubmitButton).click(); //click en boton
54+
cy.get(the.Email.input).should('have.css', 'border-color', 'rgb(255, 0, 0)');
55+
cy.get(the.Email.input).should('have.class', 'field-error');
56+
});
57+
});
58+
59+
it('GX-24109 | TC6: Validar el no funcionamiento del input correo electrónico si el mismo no tiene "." después: 1 carácter alfanumérico después de “@”.', () => {
60+
cy.fixture('data/GX-24109-TextBoxForm').then(the => {
61+
cy.get(the.Email.input).type(the.Email.data.invalid3); //no contiene "." después: 1 carácter alfanumérico después de “@”.
62+
cy.get(the.Email.input).should('have.value', the.Email.data.invalid3);
63+
cy.get(the.SubmitButton).click(); //click en boton
64+
cy.get(the.Email.input).should('have.css', 'border-color', 'rgb(255, 0, 0)');
65+
cy.get(the.Email.input).should('have.class', 'field-error');
66+
});
67+
});
68+
69+
it('GX-24109 | TC7: Validar el no funcionamiento del input correo electrónico si el mismo no tiene (mínimo) 2 caracteres alfanuméricos después de “.”.', () => {
70+
cy.fixture('data/GX-24109-TextBoxForm').then(the => {
71+
cy.get(the.Email.input).type(the.Email.data.invalid4); //no contiene (mínimo) 2 caracteres alfanuméricos después de “.”
72+
cy.get(the.Email.input).should('have.value', the.Email.data.invalid4);
73+
cy.get(the.SubmitButton).click(); //click en boton
74+
cy.get(the.Email.input).should('have.css', 'border-color', 'rgb(255, 0, 0)');
75+
cy.get(the.Email.input).should('have.class', 'field-error');
76+
});
77+
});
78+
});
79+
80+
import { removeLogs } from '@helper/RemoveLogs';
81+
82+
removeLogs();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"FullName": {
3+
"input": "#userName",
4+
"data": {
5+
"valid": "NataliaPedraza",
6+
"vacio": ""
7+
}
8+
},
9+
10+
"Email": {
11+
"input": "#userEmail",
12+
"data": {
13+
"valid": "[email protected]",
14+
"invalid1": "natipedraza22gmail.com",
15+
"invalid2": "@gmail.com",
16+
"invalid3": "natipedraza22@",
17+
"invalid4": "natipedraza22@gmail.",
18+
"vacio": ""
19+
}
20+
},
21+
22+
"CurrentAddress": {
23+
"input": "#currentAddress",
24+
"data": {
25+
"valid": "Barcelona",
26+
"vacio": ""
27+
}
28+
},
29+
30+
"PermanentAddress": {
31+
"input": "#permanentAddress",
32+
"data": {
33+
"valid": "España",
34+
"vacio": ""
35+
}
36+
},
37+
38+
"SubmitButton": "#submit"
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
ToolsQA | Elements | Text Box: Fill form and Submit
2+
3+
As a QA learner,
4+
5+
I want to test:
6+
7+
filling out a form with:
8+
9+
Full Name
10+
11+
Email
12+
13+
Current Address
14+
15+
Permanent Address
16+
17+
And Submit it.
18+
19+
So that I can improve my testing skills for this scenario.
20+
21+
🚩BUSINESS RULES SPEC
22+
23+
For: “Full Name”, “Current Address” and “Permanent Address”
24+
25+
These fields can be empty or filled.
26+
27+
IF field is empty = No log message is displayed after submitting.
28+
29+
IF field is filled = String is displayed below as a paragraph after submitting.
30+
31+
For: “Email”
32+
33+
This field can be invalid, empty or filled.
34+
35+
This field is invalid when:
36+
37+
Does not contain “@”
38+
39+
Does not contain (minimum) 1 alphanumeric character before “@”
40+
41+
Does not contain (minimum) 1 alphanumeric character after “@”
42+
43+
Does not contain “.” after: 1 alphanumeric character after “@”.
44+
45+
Does not contain (minimum) 2 alphanumeric characters after “.”
46+
47+
Mockup: “[email protected]
48+
49+
IF field is invalid = class="mr-sm-2 field-error form-control" is displayed as a red border.
50+
51+
IF field is empty = No log message is displayed after submitting.
52+
53+
IF field is filled = String is displayed below as a paragraph after submitting.

0 commit comments

Comments
 (0)