Skip to content

Commit 5c84b05

Browse files
2 parents 0ae93e7 + 9c8cad9 commit 5c84b05

File tree

4 files changed

+77
-2
lines changed

4 files changed

+77
-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-23033-Dropdown.cy.js
57+
yarn file cypress/e2e/Tests/Elements/GX-23192-download-and-upload.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-23035' #EDITAR AQUÍ EL TEST EXECUTION A IMPORTAR LAS PRUEBAS.
67+
testExecKey: 'GX-23194' #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,22 @@
1+
import { DaU } from '@pages/Elements/GX-23192-download-upload';
2+
describe('US GX-23192 | TS: ✅ToolsQA | Elements | Upload and Download', () => {
3+
beforeEach('Precondition: Having access to SUT', () => {
4+
cy.visit('/upload-download');
5+
DaU.get.mainTitle().should('have.text', 'Upload and Download');
6+
});
7+
8+
it('23193 | TC1: Validate button “download” after click downloads an image file to the pc.', () => {
9+
DaU.downloadButton();
10+
cy.readFile('cypress/downloads/sampleFile.jpeg').should('exist');
11+
});
12+
13+
it('23193 | TC2: Validate button “Choose file” after click allows you to update a file.', () => {
14+
DaU.uploadButton();
15+
DaU.get.uploadButtonText().should('contain.text', 'upexlogo.png');
16+
});
17+
});
18+
//Se importa la funcion
19+
import { removeLogs } from '@helper/RemoveLogs';
20+
21+
//Se ejecuta la funcion para evitar los errores (puedes hacerlo al final de tu codigo)
22+
removeLogs();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class DownloadAndUpload {
2+
get = {
3+
mainTitle: () => cy.get('.main-header'),
4+
downloadButton: () => cy.get('#downloadButton'),
5+
uploadButton: () => cy.get('#uploadFile'),
6+
uploadButtonText: () => cy.get('#uploadedFilePath'),
7+
};
8+
9+
downloadButton() {
10+
this.get.downloadButton().click();
11+
}
12+
13+
uploadButton() {
14+
this.get.uploadButton().selectFile('cypress/fixtures/images/upexlogo.png');
15+
}
16+
}
17+
18+
export const DaU = new DownloadAndUpload();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Challenge para QA:
2+
3+
QAA deberá de válidar la descarga realizada.
4+
5+
QAA deberá de válidar la subida de un archivo local. (NO usar una imagen nueva, usar las de ejemplo ubicadas en cypress/fixtures/image/ )
6+
7+
El objetivo del test será aprender:
8+
9+
Obtener elementos, y realizar acciones;
10+
11+
Aprender a utilizar herramientas externas y/o propias de Cypress
12+
13+
✅ACCEPTANCE CRITERIA
14+
15+
(This feature doesn’t need BDD AC - Please take a look into the BRS tab).
16+
17+
🚩BUSINESS RULES SPEC
18+
19+
Button:
20+
21+
Download:
22+
23+
IF: The "download" button is selected.
24+
25+
THEN: The file must be downloaded into the "download" PC folder.
26+
27+
Choose file:
28+
29+
IF: The "choose file" button is selected.
30+
31+
THEN: The PC File Explorer is open in order to select and upload a file.
32+
33+
AND: The uploaded file must display the Name and Location.
34+
35+
TechNote: The button “Choose File” is the only one that must be used to upload files.

0 commit comments

Comments
 (0)