Skip to content

Commit ea61f3d

Browse files
authored
Tests sisinfo
Los tests funcionan agregando los datos del archivo sql
1 parent 3b0264c commit ea61f3d

File tree

22 files changed

+8539
-0
lines changed

22 files changed

+8539
-0
lines changed

test/krakenTests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TestSISINFO
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Feature: My feature
2+
3+
@user1@web
4+
Scenario: Report Incidents
5+
Given I login with "[email protected]" and "123"
6+
When I click on incident page
7+
When I fill the incident form with the following description "La pagina esta incompleta"
8+
When I publish the incident
9+
When I log out
10+
Given I login with "[email protected]" and "admin"
11+
When I go to administracion incidents page
12+
Then I check the incident with description "La pagina esta incompleta"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Feature: My feature
2+
3+
@user1@web
4+
Scenario: Crear proyectos de grado
5+
Given I login with "[email protected]" and "admin"
6+
When I go to Proyectos de Grado section
7+
When I go to Crear Tema de Proyecto section
8+
When I create a new Proyecto de Grado called "Nuevo Proyecto 1" with description "Esto es un proyecto de prueba"
9+
When I log out
10+
Given I login with "[email protected]" and "123"
11+
When I go to Proyectos de Grado section student
12+
Then I check the admin proyects and check if exist the project "Nuevo Proyecto 1"
13+
When I log out
14+
Given I login with "[email protected]" and "admin"
15+
When I go to Proyectos de Grado section
16+
When I go to Crear Tema de Proyecto section
17+
When I create a new Proyecto de Grado called "Nuevo Proyecto 2" with description "Esto es un proyecto de prueba 2"
18+
When I log out
19+
Given I login with "[email protected]" and "123"
20+
When I go to Proyectos de Grado section student
21+
Then I check the admin proyects and check if exist the project "Nuevo Proyecto 2"
22+
23+
24+
25+
26+
27+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Feature: My feature
2+
3+
@user1@web
4+
Scenario: Assign roles for each user
5+
Given I login with "[email protected]" and "admin"
6+
When I go to Roles section
7+
When I search for user "Natalia Franco Tamara"
8+
When I click in role assign
9+
When I assign profesor role
10+
Then I check profesor role assigned
11+
When I click in role assign
12+
Then I remove profesor role
13+
When I clear search input
14+
When I search for user "Juan Pablo Fernandez Ramirez"
15+
When I click in role assign
16+
When I assign profesor role
17+
Then I check profesor role assigned
18+
When I click in role assign
19+
Then I remove profesor role
20+
When I clear search input
21+
When I search for user "Camilo Andres Escobar Velasquez"
22+
When I click in role assign
23+
When I assign coordinador role
24+
Then I check coordinador role assigned
25+
When I click in role assign
26+
Then I remove coordinador role
27+
When I clear search input
28+
When I search for user "Mario Linares Vasquez"
29+
When I click in role assign
30+
When I assign coordinador role
31+
Then I check coordinador role assigned
32+
When I click in role assign
33+
Then I remove coordinador role
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const { Given, When, Then } = require('@cucumber/cucumber');
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { After, Before } = require('@cucumber/cucumber');
2+
const { AndroidClient } = require('kraken-node');
3+
4+
Before(async function () {
5+
this.deviceClient = new AndroidClient(
6+
this.device.id, this.apkPath,
7+
this.apkPackage, this.apkLaunchActivity,
8+
{}, this.userId
9+
);
10+
this.driver = await this.deviceClient.startKrakenForUserId(this.userId);
11+
})
12+
13+
After(async function () {
14+
await this.deviceClient.stopKrakenForUserId(this.userId);
15+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const { setWorldConstructor, setDefaultTimeout, World } = require('@cucumber/cucumber');
2+
3+
class KrakenWorld {
4+
constructor(input) {
5+
let params = input.parameters;
6+
let mobileInfo = params.mobile_info || {};
7+
this.userId = params.id;
8+
this.device = params.device || {};
9+
this.testScenarioId = params.testScenarioId;
10+
this.apkPath = mobileInfo.apk_path;
11+
this.apkPackage = mobileInfo.apk_package;
12+
this.apkLaunchActivity = mobileInfo.apk_launch_activity;
13+
this.attach = input.attach;
14+
}
15+
}
16+
17+
setWorldConstructor(KrakenWorld);
18+
setDefaultTimeout(30 * 1000);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Feature: My feature
2+
3+
@user1@web
4+
Scenario: Assign roles for each user
5+
Given I login with "[email protected]" and "admin"
6+
When I go to Roles section
7+
When I search for user "Camilo Andres Escobar Velasquez"
8+
When I click in role assign
9+
When I assign coordinador role
10+
Then I log out
11+
Given I login with "[email protected]" and "123"
12+
When I click on the Profesor tab
13+
When I click on the Coordinador tab
14+
Then I click on Consultar programas de clases
15+
Then I log out
16+
Given I login with "[email protected]" and "admin"
17+
When I go to Roles section
18+
When I search for user "Camilo Andres Escobar Velasquez"
19+
When I click in role assign
20+
When I assign coordinador role
21+
22+
23+
24+
25+
26+
27+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Feature: My feature
2+
3+
@user1@web
4+
Scenario: Crear asistencia graduada y verificarla
5+
Given I login with "[email protected]" and "123"
6+
When I click on Asistencias graduadas
7+
When I click on Crear oferta
8+
When I fill the offer with name "Asistencia de DB", description "Descripción detallada" and requirement "Conocimiento básico de SQL"
9+
10+
11+
12+
13+
14+
15+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
class IncidentPage {
2+
constructor(driver) {
3+
this.driver = driver;
4+
}
5+
6+
get btnIncidentLeftPanel() { return this.driver.$('a[aria-label="Ir a Reporte de incidencias"]'); }
7+
get incidentsTypeDropdown() { return this.driver.$("//button[@role='combobox' and .//span[normalize-space()='Seleccione el tipo']]");; }
8+
get incidentTypeOption() { return this.driver.$('.//div[normalize-space()="Error en el sistema"]'); }
9+
get incidentDescription() {return this.driver.$('//textarea[@data-slot="textarea" and @placeholder="Describa el problema que presentó..." and @wrap="soft"]'); }
10+
get publishButton() { return this.driver.$('//button[@data-slot="button" and normalize-space()="Publicar"]'); }
11+
get confirmPublishButton() { return this.driver.$('//button[@type="button" and normalize-space()="Confirmar"]'); }
12+
get acceptPublishButton() { return this.driver.$('//button[normalize-space()="Aceptar"]'); }
13+
get administracionPageButton() { return this.driver.$('//button[@data-slot="collapsible-trigger" and @data-sidebar="menu-button" and normalize-space()="Administracion"]'); }
14+
get seeIndidentsButton() { return this.driver.$('//a[@data-slot="sidebar-menu-sub-button" and @data-sidebar="menu-sub-button" and @href="/inicio//administrador/incidencia" and .//span[normalize-space()="Ver incidencias"]]'); }
15+
16+
async goToIncidentPage() {
17+
await (await this.btnIncidentLeftPanel).click();
18+
await this.driver.pause(2000);
19+
}
20+
21+
async fillIncident(description) {
22+
await (await this.incidentsTypeDropdown).click();
23+
await this.driver.pause(1000);
24+
await (await this.incidentTypeOption).click();
25+
await this.driver.pause(1000);
26+
await (await this.incidentDescription).setValue(description);
27+
await this.driver.pause(1000);
28+
}
29+
30+
async publishIncident() {
31+
await (await this.publishButton).click();
32+
await this.driver.pause(1000);
33+
await (await this.confirmPublishButton).click();
34+
await this.driver.pause(2000);
35+
await (await this.acceptPublishButton).click();
36+
await this.driver.pause(2000);
37+
}
38+
39+
async goToAdministracionIncidents() {
40+
await (await this.administracionPageButton).click();
41+
await this.driver.pause(1000);
42+
await (await this.seeIndidentsButton).click();
43+
await this.driver.pause(2000);
44+
}
45+
46+
async verifyTheIncidentCreated(description) {
47+
const elements = await this.driver.$(`//td[@data-slot="table-cell" and contains(normalize-space(.), "${description}")]`);
48+
console.log(elements);
49+
}
50+
51+
52+
}
53+
54+
module.exports = IncidentPage;

0 commit comments

Comments
 (0)