systelab / seed-angular

Seed for Systelab Angular projects
MIT License
3 stars 6 forks source link

Wdio migration #69

Closed EduAlberdi closed 2 years ago

EduAlberdi commented 2 years ago

PR Details

Migrate e2e test from protractor to WDIO

Description

Updated e2e testing suite from Protractor to WDIO with new systelab-components-wdio-test npm package.

Related Issue

68

Motivation and Context

How Has This Been Tested

WDIO (log at the end of this PR)

Types of changes

Checklist

$ npx wdio run e2e-wdio/wdio.conf.js

Execution of 4 workers started at 2022-01-17T15:07:08.619Z

[0-0] RUNNING in chrome - seed-angular\e2e-wdio\tests\allergy-crud.e2e-spec.ts
2022-01-17T15:07:10.707Z WARN chromedriver: [1642432030.707][WARNING]: This version of ChromeDriver has not been tested with Chrome version 97.
[0-0]
[0-0]   TC0004_AllergyManagement_e2e
[0-0]     Create an allergy with the following data: [name: 'Insect bites', sign: 'Skin rashes', symptom: 'Cough, itching and fever']
[0-0]       ✓ Allergies grid has 1 rows
[0-0]       ✓ Value of 'Name' for row 0 of allergies grid is 'Insect bites'
[0-0]       ✓ Value of 'Signs' for row 0 of allergies grid is 'Skin rashes'
[0-0]       ✓ Value of 'Symptoms' for row 0 of allergies grid is 'Cough, itching and fever'
[0-0]       Time: 570 ms
[0-0]     Try to create another allergy with invalid data (empty name)
[0-0]       ✓ Error message popup is shown
[0-0]       Time: 503 ms
[0-0]     Click on first row of allergies grid to view details of just created allergy
[0-0]       ✓ Allergy data shown on dialog is: [name: 'Insect bites', sign: 'Skin rashes', symptom: 'Cough, itching and fever']
[0-0]       Time: 181 ms
[0-0]     Edit name of existing allergy and set it to 'Mosquito bites'
[0-0]       ✓ Allergies grid has 1 rows
[0-0]       ✓ Value of 'Name' for row 0 of allergies grid is 'Mosquito bites'
[0-0]       ✓ Value of 'Signs' for row 0 of allergies grid is 'Skin rashes'
[0-0]       ✓ Value of 'Symptoms' for row 0 of allergies grid is 'Cough, itching and fever'
[0-0]       Time: 566 ms
[0-0]     Delete an allergy
[0-0]       ✓ Allergies grid has 0 rows
[0-0]       Time: 737 ms
[0-0] PASSED in chrome - seed-angular\e2e-wdio\tests\allergy-crud.e2e-spec.ts
[0-1] RUNNING in chrome - seed-angular\e2e-wdio\tests\login.e2e-spec.ts
2022-01-17T15:07:16.327Z WARN chromedriver: [1642432036.328][WARNING]: This version of ChromeDriver has not been tested with Chrome version 97.
[0-1]
[0-1]   TC0002_LoginManagement_e2e
[0-1]     Fill in the login form with a valid username and password
[0-1]       ✓ The logged user is Administrator
[0-1]       Time: 807 ms
[0-1]     Invalid username or password message is displayed
[0-1]       ✓ Invalid username or password message is displayed
[0-1]       Time: 328 ms
[0-1] PASSED in chrome - seed-angular\e2e-wdio\tests\login.e2e-spec.ts
[0-2] RUNNING in chrome - seed-angular\e2e-wdio\tests\patient-allergy.e2e-spec.ts
2022-01-17T15:07:19.543Z WARN chromedriver: [1642432039.544][WARNING]: This version of ChromeDriver has not been tested with Chrome version 97.
[0-2]
[0-2]   TC0003_PatientManagement_Allergy_e2e
[0-2]     Assign an allergy to a patient: [name: Insect Bites, asserted date: 01/01/2019, comments: Comments should go here]
[0-2]       ✓ Patient allergies grid has 1 rows
[0-2]       ✓ Value of 'Name' for row 0 of patient allergies grid is 'Insect Bites'
[0-2]       ✓ Value of 'Asserted Date' for row 0 of patient allergies grid is '01/01/2019'
[0-2]       ✓ Value of 'Comments' for row 0 of patient allergies grid is 'Comments should go here'
[0-2]       Time: 1167 ms
[0-2]     Try to assign an allergy with invalid data to a patient (no allergy selected)
[0-2]       ✓ Error message popup is shown
[0-2]       Time: 909 ms
[0-2]     Remove an allergy from a patient
[0-2]       ✓ Patient allergies grid has 0 rows
[0-2]       Time: 746 ms
[0-2] PASSED in chrome - seed-angular\e2e-wdio\tests\patient-allergy.e2e-spec.ts
[0-3] RUNNING in chrome - seed-angular\e2e-wdio\tests\patient-crud.e2e-spec.ts
2022-01-17T15:07:30.025Z WARN chromedriver: [1642432050.026][WARNING]: This version of ChromeDriver has not been tested with Chrome version 97.
[0-3]
[0-3]   TC0001_PatientManagement_e2e
[0-3]     Create a patient with the following data: [name: John, surname: Smith, email: jsmith@yahoo.com]
[0-3]       ✓ Patients grid has 1 rows
[0-3]       ✓ Value of 'Name' for row 0 of patients grid is 'John'
[0-3]       ✓ Value of 'Surname' for row 0 of patients grid is 'Smith'
[0-3]       ✓ Value of 'Email' for row 0 of patients grid is 'jsmith@yahoo.com'
[0-3]       Time: 1908 ms
[0-3]     Try to create another patient with invalid data (empty name)
[0-3]       ✓ Error message popup is shown
[0-3]       Time: 774 ms
[0-3]     Click on first row of patients grid to view details of just created patient
[0-3]       ✓ Patient data shown on dialog is: [name: 'John', sign: 'Smith', email: 'jsmith@yahoo.com, address: 'Main Street, Toronto, 12345, 11212, 1212']
[0-3]       Time: 288 ms
[0-3]     Edit name of existing patient and set it to 'Peter'
[0-3]       ✓ Patients grid has 1 rows
[0-3]       ✓ Value of 'Name' for row 0 of patients grid is 'Peter'
[0-3]       ✓ Value of 'Surname' for row 0 of patients grid is 'Smith'
[0-3]       ✓ Value of 'Email' for row 0 of patients grid is 'jsmith@yahoo.com'
[0-3]       Time: 969 ms
[0-3]     Delete a patient
[0-3]       ✓ Patients grid has 0 rows
[0-3]       Time: 714 ms
[0-3] PASSED in chrome - seed-angular\e2e-wdio\tests\patient-crud.e2e-spec.ts

Spec Files:      4 passed, 4 total (100% completed) in 00:00:27
olgapuig commented 2 years ago

@alfonsserra, Edu needs access to snyk to see the failed test and the new vulnerability. Please, could you grant him access?