generated from Arquisoft/lomap_0
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
UO263728
authored and
UO263728
committed
Apr 30, 2023
1 parent
a09d602
commit 41e6711
Showing
2 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,15 +25,15 @@ defineFeature(feature, (test) => { | |
|
||
given('El usuario se encuentra en la página de inicio de sesión', async () => { | ||
await page.goto("http://localhost:3000/user"); | ||
await page.waitForNavigation(); | ||
}); | ||
|
||
when('el usuario hace click sobre el botón LOGIN y es redirigido a la página de Inrupt', async () => { | ||
await expect(page).toClick('button', { text: 'Login' }); | ||
await page.waitForNavigation(); | ||
}); | ||
|
||
then('el usuario introduce su usuario y contraseña incorrectamente', async () => { | ||
await page.type('input', 'ejemplo123'); | ||
await page.type('input#username', ''); | ||
await page.type('input#password', '123Ejemplo!'); | ||
await page.click('button'); | ||
}); | ||
|
@@ -49,21 +49,24 @@ defineFeature(feature, (test) => { | |
given('el usuario se encuentra en la página de inicio de sesión', async () => { | ||
page = await browser.newPage(); | ||
await page.goto("http://localhost:3000/user"); | ||
await page.waitForNavigation(); | ||
}); | ||
|
||
when('el usuario hace click sobre el botón LOGIN y es redirigido a la página de Inrupt', async () => { | ||
await expect(page).toClick('button', { text: 'Login' }); | ||
await page.waitForNavigation(); | ||
}); | ||
|
||
then('el usuario introduce su usuario y contraseña correctamente e inicia sesión', async () => { | ||
await page.type('input', 'ejemplo123'); | ||
await page.type('input#username', 'ejemplo123'); // email = [email protected] | ||
await page.type('input#password', '123Ejemplo!'); | ||
await page.click('button'); | ||
await page.waitForNavigation(); | ||
}); | ||
|
||
and('el usuario es redirigido a su perfil en la app', async () => { | ||
await expect(page.url()).toMatch('http://localhost:3000/start'); | ||
and('el usuario puede visualizar su perfil en la app', async () => { | ||
await page.goto("http://localhost:3000/user"); | ||
await page.waitForNavigation(); | ||
}); | ||
}); | ||
|
||
|