Skip to content

Commit ce335f1

Browse files
Merge pull request #578 from upex-galaxy/test/GX3-798/Textbox-fill-form-and-submit
Merge GX3-798 into QA
2 parents 581d80b + 2ade06e commit ce335f1

File tree

3 files changed

+107
-2
lines changed

3 files changed

+107
-2
lines changed

.github/workflows/CI-Suite.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
browser: electron
5757
command: | #EDITAR AQUÍ EL ARCHIVO SUITE A EJECUTAR:
58-
yarn file cypress/e2e/Tests/Elements/GX3-865-Buttons.cy.js
58+
yarn file cypress/e2e/Tests/Elements/GX3-798-TextBox-Fill-form-and-Submit.cy.js
5959
6060
- name: ✅Import Test Results to Xray
6161
if: always()
@@ -65,7 +65,7 @@ jobs:
6565
password: ${{secrets.XRAY_CLIENT_SECRET}}
6666
testFormat: 'junit' #OPCIONES PARA CAMBIAR: 'junit' (para xml) o 'cucumber' (para json)
6767
testPaths: 'reports/test-results.xml' #OPCIONES: '/test-results.xml' o 'cucumber-report.json'
68-
testExecKey: "GX3-1099" #tools-qa-elements-radio-buttons.
68+
testExecKey: "GX3-805" #tools-qa-elements-radio-buttons.
6969
projectKey: 'GX3' #EDITAR EN CASO DE TRABAJAR CON OTRO PROYECTO.
7070

7171
- name: 🔔Slack Notification of Done
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
describe('GX3-798 | TS: ToolsQA | Elements | Text Box', () => {
2+
// ARRANGE
3+
beforeEach('', () => {
4+
cy.visit('https://demoqa.com/text-box');
5+
cy.url().should('contain', 'text-box');
6+
});
7+
8+
//casos
9+
it('799|TC1: Validar que se realiza el envio exitoso cuando los datos son ingresados correctamente', () => {
10+
//constantes
11+
const jUserName = 'Janetzi';
12+
const jUserEmails = '[email protected]';
13+
const jCurrentAddress = 'Direccion principal';
14+
const jPermanentAddress = 'Direccion secundaria';
15+
//steps
16+
cy.get('input#userName').type(jUserName);
17+
cy.get('input#userEmail').type(jUserEmails);
18+
cy.get('textarea#currentAddress').type(jCurrentAddress);
19+
cy.get('textarea#permanentAddress').type(jPermanentAddress);
20+
cy.get('#submit').click();
21+
22+
//Assertion
23+
cy.get('p#name').should('contains.text', jUserName);
24+
cy.get('p#email').should('contains.text', jUserEmails);
25+
cy.get('p#currentAddress').should('contains.text', jCurrentAddress);
26+
cy.get('p#permanentAddress').should('contains.text', jPermanentAddress);
27+
});
28+
29+
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', () => {
30+
const jEmail02 = '[email protected]';
31+
32+
cy.get('input#userName').should('be.empty');
33+
cy.get('input#userEmail').type(jEmail02);
34+
cy.get('textarea#currentAddress').should('be.empty');
35+
cy.get('textarea#permanentAddress').should('be.empty');
36+
cy.get('#submit').click();
37+
38+
//Assertion
39+
cy.get('p#email').should('contains.text', jEmail02);
40+
});
41+
42+
it('799|TC3: Validar que el envio es fallido cuando el campo email no contiene @.', () => {
43+
//const
44+
const jEmail03 = 'janetzigmail.com';
45+
//steps
46+
cy.get('input#userEmail').type(jEmail03);
47+
cy.get('#submit').click();
48+
49+
//Assertion
50+
cy.get('input.mr-sm-2.field-error').should('be.enabled');
51+
});
52+
53+
it('799|TC4: Validar que el envio es fallido cuando el campo email No contiene (mínimo) 1 carácter alfanumérico antes de @', () => {
54+
const jEmail04 = 'janetzi@';
55+
//steps
56+
cy.get('input#userEmail').type(jEmail04);
57+
cy.get('#submit').click();
58+
59+
//Assertion
60+
cy.get('input.mr-sm-2.field-error').should('be.enabled');
61+
});
62+
63+
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 @', () => {
64+
const jEmail05 = '@gmail.com';
65+
//steps
66+
cy.get('input#userEmail').type(jEmail05);
67+
cy.get('#submit').click();
68+
69+
//Assertion
70+
cy.get('input.mr-sm-2.field-error').should('be.enabled');
71+
});
72+
73+
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 @', () => {
74+
const jEmail06 = '@gmailcom';
75+
//steps
76+
cy.get('input#userEmail').type(jEmail06);
77+
cy.get('#submit').click();
78+
79+
//Assertion
80+
cy.get('input.mr-sm-2.field-error').should('be.enabled');
81+
});
82+
83+
it('799|TC7: Validar que el envio es fallido cuando el campo email No contiene (mínimo) 2 caracteres alfanuméricos después de .', () => {
84+
const jEmail07 = '.com';
85+
//steps
86+
cy.get('input#userEmail').type(jEmail07);
87+
cy.get('#submit').click();
88+
89+
//Assertion
90+
cy.get('input.mr-sm-2.field-error').should('be.enabled');
91+
});
92+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
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
2+
testing skills for this scenario.
3+
4+
🚩BUSINESS RULES SPEC For: “Full Name”, “Current Address” and “Permanent Address” These fields can be empty or filled. IF field is empty = No log
5+
message is displayed after submitting. IF field is filled = String is displayed below as a paragraph after submitting. For: “Email” This field can be
6+
invalid, empty or filled.
7+
8+
This field is invalid when: Does not contain “@” Does not contain (minimum) 1 alphanumeric character before “@” Does not contain (minimum) 1
9+
alphanumeric character after “@” Does not contain “.” after: 1 alphanumeric character after “@”. Does not contain (minimum) 2 alphanumeric characters
10+
after “.” Mockup: “[email protected]
11+
12+
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
13+
submitting. IF field is filled = String is displayed below as a paragraph after submitting.

0 commit comments

Comments
 (0)