Skip to content

Commit 6778e45

Browse files
Merge pull request #372 from upex-galaxy/GX-23008-✅-tools-qa-elements-upload-and-download
Merge GX-23008 into QA
2 parents afcc366 + 535ff77 commit 6778e45

File tree

4 files changed

+66
-2
lines changed

4 files changed

+66
-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-22346-Dropdown.cy.js
57+
yarn file cypress/e2e/Tests/Elements/GX-23008-Upload-and-Download.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-22348' #EDITAR AQUÍ EL TEST EXECUTION A IMPORTAR LAS PRUEBAS.
67+
testExecKey: 'GX-23010' #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,18 @@
1+
import { removeLogs } from '@helper/RemoveLogs';
2+
removeLogs();
3+
4+
import { Elements } from '@pages/Elements/GX-23008-Upload-and-Download.Page';
5+
6+
describe('✅-tools-qa-elements-upload-and-download', () => {
7+
beforeEach('Usuario se encuentra dentro del Sut', () => {
8+
cy.visit('/upload-download');
9+
});
10+
it('23009 | TC1: Validar que al seleccionar el botón “Download” se descarga un archivo al ordenador', () => {
11+
Elements.get.ButtonDownload().click();
12+
cy.readFile('cypress/downloads/sampleFile.jpeg').should('exist');
13+
});
14+
it('23009 | TC2: Validar subir un archivo con el botón “Seleccionar archivo”', () => {
15+
Elements.UploadFile('images/upexlogo.png');
16+
Elements.get.ValidationFile().should('contain.text', 'upexlogo.png');
17+
});
18+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class ElementsToolQA {
2+
get = {
3+
ButtonDownload: () => cy.get('#downloadButton'),
4+
ButtonChooseFile: () => cy.get('input[id ="uploadFile"]'),
5+
ValidationFile: () => cy.get('#uploadedFilePath'),
6+
};
7+
8+
UploadFile(type) {
9+
this.get.ButtonChooseFile().attachFile(type);
10+
}
11+
}
12+
13+
export const Elements = new ElementsToolQA();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Description =
2+
3+
Challenge para QA:
4+
5+
QAA deberá de válidar la descarga realizada.
6+
7+
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/ )
8+
9+
El objetivo del test será aprender:
10+
11+
Obtener elementos, y realizar acciones;
12+
13+
Aprender a utilizar herramientas externas y/o propias de Cypress
14+
15+
# 🚩BUSINESS RULES SPEC
16+
17+
Button:
18+
19+
Download:
20+
21+
IF: The "download" button is selected.
22+
23+
THEN: The file must be downloaded into the "download" PC folder.
24+
25+
Choose file:
26+
27+
IF: The "choose file" button is selected.
28+
29+
THEN: The PC File Explorer is open in order to select and upload a file.
30+
31+
AND: The uploaded file must display the Name and Location.
32+
33+
// TechNote: The button “Choose File” is the only one that must be used to upload files

0 commit comments

Comments
 (0)