Skip to content

Commit

Permalink
arreglo
Browse files Browse the repository at this point in the history
  • Loading branch information
uo285427 committed May 1, 2024
1 parent 2cb7241 commit 055674f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions webapp/e2e/steps/login-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ let page;
let browser;

defineFeature(feature, test => {

const username = "testUserLogin"
const password = "testUserLogin"
beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
Expand All @@ -21,6 +22,10 @@ defineFeature(feature, test => {
waitUntil: "networkidle0",
})
.catch(() => {});
await expect(page).toClick("button", { text: "¿No tienes cuenta? Registrate aqui." });
await expect(page).toFill('input[name="username"]', username);
await expect(page).toFill('input[name="password"]', password);
await expect(page).toClick('button', { text: 'Añadir usuario' })
});

test('An user logs in with valid credentials', ({given,when,then}) => {
Expand All @@ -29,8 +34,8 @@ defineFeature(feature, test => {
let password;

given('An user is in the login page', async () => {
username = "jesus"
password = "jesus"
username = "testUserLogin"
password = "testUserLogin"
});

when('I fill the data in the form and press submit', async () => {
Expand Down

0 comments on commit 055674f

Please sign in to comment.