Skip to content

Commit ac3e2e7

Browse files
2 parents 69b5e44 + 2b743fb commit ac3e2e7

18 files changed

+519
-3
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/Elements/GX-29819-RadioButtons.cy.js
57+
yarn file cypress/e2e/Tests/Elements/GX-32427-RadioButtons.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-29821' #EDITAR AQUÍ EL TEST EXECUTION A IMPORTAR LAS PRUEBAS.
67+
testExecKey: 'GX-32429' #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

.github/workflows/CI-regressionQA.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
browser: chrome
6161
command: | #NO EDITAR. Es para correr todas las pruebas del Repo.
62-
yarn regression cypress/e2e/Tests/Elements/GX-29755-Elements-radioButtons.cy.js
62+
yarn regression
6363
6464
- name: 📬Generate XML Regression Report
6565
if: always()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { removeLogs } from '@helper/RemoveLogs';
2+
3+
//test set:
4+
describe('GX-29736 ToolsQA | Elements | Radio Buttons', () => {
5+
//todo: precondiciones
6+
beforeEach('Precondición', () => {
7+
const endpoint = '/radio-button';
8+
cy.visit(`/${endpoint}`);
9+
});
10+
11+
// afterEach('', () => {
12+
13+
// })
14+
15+
it('29756 | TC1: Validar visualizar el label YES cuando se selecciona el radio button Yes', () => {
16+
//tags
17+
cy.get('#yesRadio').click({ force: true });
18+
cy.contains('You have selected').children().should('have.text', 'Yes');
19+
//cy.contains('You have selected').children().should.equal('yes');
20+
//
21+
});
22+
23+
it('29756 | TC2: Validar visualizar el label Impressive cuando se selecciona el radio button Impressive', () => {
24+
//tags
25+
cy.get('#impressiveRadio').click({ force: true });
26+
cy.contains('You have selected').children().should('have.text', 'Impressive');
27+
//cy.contains('You have selected').children().should.equal('yes');
28+
29+
//
30+
});
31+
32+
it('29756 | TC3: Validar que el radio button con label "NO" este deshabilitado y no se pueda seleccionar', () => {
33+
//tags
34+
cy.get('#noRadio').should('be.disabled');
35+
cy.contains('You have selected').should('not.exist');
36+
//cy.contains('You have selected').children().should.equal('yes');
37+
38+
//
39+
});
40+
});
41+
42+
//ES module imports/exports
43+
removeLogs();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { removeLogs } from '@helper/RemoveLogs';
2+
removeLogs();
3+
import data from '@data/GX-30150-RadioButtons.json';
4+
import { ButtonsSelected } from '@pages/Elements/GX-30150-RadioButtons.Page';
5+
6+
//* Test Set
7+
describe('ToolsQA | Elements | Radio Buttons', () => {
8+
beforeEach('Usuario se encuentra en el site web radio buttons', () => {
9+
cy.visit(data.endPoint);
10+
cy.url().should('contain', data.endPoint);
11+
});
12+
it('30151 | TC01: Validar que el RB “Yes” pueda ser seleccionado', () => {
13+
ButtonsSelected.ClickOnYesButtons();
14+
ButtonsSelected.get
15+
.Response()
16+
.should('be.visible')
17+
.and('contain.text', data.Response + data.Buttons.Yes);
18+
});
19+
it('30151 | TC02: Validar que el RB “Impressive” pueda ser seleccionado', () => {
20+
ButtonsSelected.ClickOnImpressiveButton();
21+
cy.contains(data.Response).children().should('be.visible').and('contain.text', data.Buttons.Impressive);
22+
});
23+
it('30151 | TC03: Validar que el RB “No” no puede ser seleccionado', () => {
24+
ButtonsSelected.get.NoButton().should('be.disabled');
25+
ButtonsSelected.get.Response().should('not.exist');
26+
});
27+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { removeLogs } from '@helper/RemoveLogs';
2+
//* Test Set:
3+
describe('GX30846: ToolsQA | Elements | Radio Buttons', () => {
4+
//todo: Precondiciones
5+
beforeEach('Precondición', () => {
6+
const endpoint = '/radio-button';
7+
cy.visit(`/${endpoint}`);
8+
});
9+
10+
it('TC1: Validar visualizar el label YES cuando selecciona el radio button Yes', () => {
11+
//* CSS Selectors in Cypress
12+
cy.get('#yesRadio').click({ force: true }).should('be.checked');
13+
cy.get('[class=text-success]').should('have.text', 'Yes');
14+
cy.contains('You have selected ').children().should('have.text', 'Yes');
15+
});
16+
17+
it('TC2: Validar visualizar el label Impressive cuando selecciona el radio button impresive', () => {
18+
//* CSS Selectors in Cypress
19+
cy.get('#impressiveRadio').click({ force: true }).should('be.checked');
20+
cy.contains('You have selected ').children().should('have.text', 'Impressive');
21+
});
22+
23+
it('TC3: Validar visualizar el label "NO" este deshabilitado y no se pueda seleccionar', () => {
24+
//* CSS Selectors in Cypress
25+
cy.get('#noRadio').should('be.disabled');
26+
cy.get('you have selected').should('not.exist');
27+
});
28+
});
29+
30+
//ES Module import/exports
31+
removeLogs();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { removeLogs } from '@helper/RemoveLogs';
2+
removeLogs();
3+
describe('GX-31663|🪶ToolsQA | Elements | Radio Buttons', () => {
4+
beforeEach('Visitar la pagina Tools QA', () => {
5+
cy.visit('https://demoqa.com/radio-button');
6+
});
7+
it('31666 | TC1: Validar al seleccionar el radio button “Yes“, el siguiente mensaje : “You have selected Yes“.', () => {
8+
cy.get('#yesRadio').click({ force : true });
9+
cy.contains('You have selected ').children().should('have.text', 'Yes');
10+
});
11+
it('31666 | TC2: Validar al seleccionar el radio button “impressive“, el siguiente mensaje : “You have selected Impressive“.', () => {
12+
cy.get('#impressiveRadio').click({ force : true });
13+
cy.contains('You have selected ').children().should('have.text', 'Impressive');
14+
});
15+
it('31666 | TC3: Validar el radio button “NO“ esté deshabilitado y no se pueda seleccionar.', () => {
16+
cy.get('#noRadio').should('be.disabled');
17+
cy.contains('You have selected ').should('not.exist');
18+
});
19+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
describe('GX-32081-✅-tools-qa-elements-text-box-fill-form-and-submit', () => {
2+
beforeEach('Visitar la pagina DemoQA', () => {
3+
cy.visit('/text-box');
4+
});
5+
//todo: Forma 1
6+
it('32082 | TC1: Validar resultado después de completar formulario con datos validos', () => {
7+
//todo: Completar formularios
8+
textBoxPage.fillUserNameInput(data.valid.userName);
9+
textBoxPage.fillEmailInput(data.valid.userEmail);
10+
textBoxPage.fillCurrentAddressInput(data.valid.userCurrentAddress);
11+
textBoxPage.fillPermanentAddressInput(data.valid.userPermanentAddress);
12+
textBoxPage.clickOnSubmitButton();
13+
//todo: Validaciones
14+
textBoxPage.get.nameResult().should('contain', data.valid.userName);
15+
textBoxPage.get.emailResult().should('contain', data.valid.userEmail);
16+
textBoxPage.get.currentAddressResult().should('contain', data.valid.userCurrentAddress);
17+
textBoxPage.get.permanentAddressResult().should('contain', data.valid.userPermanentAddress);
18+
});
19+
//todo: Forma 2
20+
it('32082 | TC1: Validar resultado después de completar formulario con datos validos', () => {
21+
textBoxPage.completeForm({
22+
userName: data.valid.userName,
23+
email: data.valid.userEmail,
24+
currentAddress: data.valid.userCurrentAddress,
25+
permanentAddress: data.valid.userPermanentAddress,
26+
});
27+
//todo: Validaciones
28+
textBoxPage.get.nameResult().should('contain', data.valid.userName);
29+
textBoxPage.get.emailResult().should('contain', data.valid.userEmail);
30+
textBoxPage.get.currentAddressResult().should('contain', data.valid.userCurrentAddress);
31+
textBoxPage.get.permanentAddressResult().should('contain', data.valid.userPermanentAddress);
32+
});
33+
it('32082 | TC2: Validar No genere resultado después de completar “Input email” con datos inválidos', () => {
34+
data.invalid.forEach(invalidData => {
35+
textBoxPage.fillEmailInput(invalidData.email);
36+
textBoxPage.clickOnSubmitButton();
37+
//todo: validaciones
38+
textBoxPage.get.emailResult().should('not.exist');
39+
textBoxPage.get.inputEmail().should('have.css', 'border', '1px solid rgb(255, 0, 0)');
40+
textBoxPage.clearEmailInput();
41+
});
42+
});
43+
});
44+
import data from '../../../fixtures/data/GX-32081-textBoxLeonardo.json';
45+
import { textBoxPage } from '@pages/Elements/GX-32081-textBoxLeonardo.Page';
46+
import { removeLogs } from '@helper/RemoveLogs';
47+
removeLogs();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { removeLogs } from '@helper/RemoveLogs';
2+
removeLogs();
3+
4+
describe('GX-32427 tools-qa-elements-radio-buttons', () => {
5+
beforeEach('Precondicion: Usuario debe estar en la pagina Radio-Button', () => {
6+
cy.visit('https://demoqa.com/radio-button');
7+
cy.url().should('contain', 'button');
8+
});
9+
it('32628 | TC1: Validar hacer click en boton Yes', () => {
10+
cy.get("[for='yesRadio']").click();
11+
});
12+
it('32628 | TC2: Validar hacer click en boton Impressive ', () => {
13+
cy.get("[for='impressiveRadio']").click();
14+
});
15+
it('32628 | TC3: Validar existencia en boton NO ', () => {
16+
cy.contains('No').should('be.visible');
17+
});
18+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"endPoint": "/radio-button",
3+
"Response": "You have selected ",
4+
"Buttons": {
5+
"Yes": "Yes",
6+
"Impressive": "Impressive",
7+
"No": "No"
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"valid": {
3+
"userName": "Leonardo",
4+
"userEmail": "[email protected]",
5+
"userCurrentAddress": "Calle 1",
6+
"userPermanentAddress": "Calle 2"
7+
},
8+
"invalid": [
9+
{
10+
"email": "leonardo@"
11+
},
12+
{
13+
"email": "leonardo"
14+
},
15+
{
16+
"email": "leonardo.com"
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import data from '@data/GX-30150-RadioButtons.json';
2+
3+
class Buttons {
4+
get = {
5+
YesButton: () => cy.get('[for="yesRadio"]'),
6+
ImpressiveButton: () => cy.get('[for="impressiveRadio"]'),
7+
NoButton: () => cy.get('#noRadio'),
8+
Response: () => cy.get('[class="mt-3"]'),
9+
};
10+
ClickOnYesButtons() {
11+
this.get.YesButton().should('contain', data.Buttons.Yes).click();
12+
}
13+
ClickOnImpressiveButton() {
14+
this.get.ImpressiveButton().should('contain', data.Buttons.Impressive).click();
15+
}
16+
}
17+
18+
export const ButtonsSelected = new Buttons();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
class textboxPage {
2+
get = {
3+
inputUserName: () => cy.get('#userName'),
4+
inputEmail: () => cy.get('#userEmail'),
5+
inputCurrentAddress: () => cy.get('#currentAddress'),
6+
inputPermanentAddress: () => cy.get('#permanentAddress'),
7+
submitButton: () => cy.get('#submit'),
8+
nameResult: () => cy.get('#name'),
9+
emailResult: () => cy.get('#email'),
10+
currentAddressResult: () => cy.get('p[id=currentAddress]'),
11+
permanentAddressResult: () => cy.get('p[id=permanentAddress]'),
12+
};
13+
fillUserNameInput(val) {
14+
this.get.inputUserName().type(val);
15+
}
16+
fillEmailInput(val) {
17+
this.get.inputEmail().type(val);
18+
}
19+
fillCurrentAddressInput(val) {
20+
this.get.inputCurrentAddress().type(val);
21+
}
22+
fillPermanentAddressInput(val) {
23+
this.get.inputPermanentAddress().type(val);
24+
}
25+
clickOnSubmitButton() {
26+
this.get.submitButton().click();
27+
}
28+
clearEmailInput() {
29+
this.get.inputEmail().clear();
30+
}
31+
completeForm({ userName: val, email: val2, currentAddress: val3, permanentAddress: val4 }) {
32+
this.get.inputUserName().type(val);
33+
this.get.inputEmail().type(val2);
34+
this.get.inputCurrentAddress().type(val3);
35+
this.get.inputPermanentAddress().type(val4);
36+
this.get.submitButton().click();
37+
}
38+
}
39+
export const textBoxPage = new textboxPage();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
ID: https://upexgalaxy24.atlassian.net/browse/GX-29736
2+
3+
# Summary: ToolsQA | Elements | RadioButtons
4+
5+
Como QA aprendiz, Quiero testear los Radio Buttons Para practicar hacer este tipo de Escenario de Testing
6+
7+
```
8+
🧪Test Strategy
9+
10+
Utiilizar Scripts sencillos para tomar elementos con CSS Selectors
11+
12+
No utilizar un enfoque random
13+
14+
No tomar los textos de los elementos clickeados para utilizar luego.
15+
16+
Usar un enfoque sencillo con data esperada.
17+
```
18+
19+
✅ACCEPTANCE CRITERIA (Esta Feature no necesita una US formato BDD; por favor revisar las BRS)
20+
21+
🚩BUSINESS RULES SPEC
22+
23+
Cada Radio Buttons (RB) debe tener la siguiente etiqueta respectiva, hay un total de 3:
24+
25+
Yes Impressive No
26+
27+
Output: Por cada vez que se seleccione un RB, debe visualizar el mensaje siguiente:
28+
29+
“You have selected ” + buttonName
30+
31+
(TechNote: tomar en cuenta la separación)
32+
33+
donde “buttonName” = RB seleccionado
34+
35+
Excepción: El único RB que no debe ser seleccionado es el “No” El cursor del mouse no puede seleccionarlo.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# GX-30150 🪶ToolsQA | Elements | Radio Buttons
2+
3+
**Link Jira:** https://upexgalaxy24.atlassian.net/browse/GX-30150
4+
5+
**Sprint:** **_Galaxy🚀Sprint #24🪶_**
6+
7+
**Epic Link:** https://upexgalaxy24.atlassian.net/browse/GX-1
8+
9+
### _Description:_
10+
11+
#### Como QA aprendiz,
12+
13+
#### Quiero testear los Radio Buttons
14+
15+
#### Para practicar hacer este tipo de Escenario de Testing
16+
17+
## **✅ACCEPTANCE CRITERIA**
18+
19+
(Esta Feature no necesita una US formato BDD; por favor revisar las BRS)
20+
21+
## **🚩BUSINESS RULES SPEC**
22+
23+
- Cada Radio Buttons (RB) debe tener la siguiente etiqueta respectiva, hay un total de 3:
24+
- Yes
25+
- Impressive
26+
- No
27+
- Output:
28+
- Por cada vez que se seleccione un RB, debe visualizar el mensaje siguiente:
29+
- “You have selected ” + buttonName
30+
- (TechNote: tomar en cuenta la separación)
31+
- donde “buttonName” = RB seleccionado
32+
- Excepción:
33+
- El único RB que no debe ser seleccionado es el “No”
34+
- El cursor del mouse no puede seleccionarlo.
35+
36+
## **🧬WORKFLOW**
37+
38+
### N/A
39+
40+
## **🧪Test Strategy**
41+
42+
- **Utilizar Scripts sencillos para tomar elementos con CSS Selectors**
43+
- **No utilizar un enfoque random**
44+
- **No tomar los textos de los elementos clickeados para utilizar luego.**
45+
- **Usar un enfoque sencillo con data esperada.**

0 commit comments

Comments
 (0)