Skip to content

Commit

Permalink
Merge pull request #48 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Arreglo de tests e2e no encuentra elementos
  • Loading branch information
Verzidee authored Apr 7, 2024
2 parents faa761f + e5b904b commit fe2bb19
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions webapp/e2e/steps/history.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ defineFeature(feature, test => {
await expect(page).toFill('input[name="username"]', username);
await expect(page).toFill('input[name="password"]', password);
await expect(page).toClick('button[name="entrarPage"]');
await page.waitForTimeout(1500);
});

when('I press history', async () => {
Expand Down
3 changes: 3 additions & 0 deletions webapp/e2e/steps/jugar-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ defineFeature(feature, (test) => {
await expect(page).toFill('input[name="username"]', username);
await expect(page).toFill('input[name="password"]', password);
await expect(page).toClick('button[name="entrarPage"]');
await page.waitForTimeout(1500);
});

when('the user clicks the "Play" button on the homepage', async () => {
//NO LO ENCUENTRA
await expect(page).toClick('button', { text: 'JUGAR' })
await page.waitForTimeout(1500);
});

then('the questions should be displayed', async () => {
Expand Down
3 changes: 3 additions & 0 deletions webapp/e2e/steps/login-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ defineFeature(feature, test => {
waitUntil: "networkidle0",
}).catch(() => {});


//Registrar al user

await expect(page).toFill('input[name="username"]', username);
Expand All @@ -44,10 +45,12 @@ defineFeature(feature, test => {

when('Presses submit', async () => {
await expect(page).toClick('button[name="entrarPage"]');
await page.waitForTimeout(1500);
});


then('The user is redirected', async () => {
//No lo encuentra
await expect(page).toMatchElement("p", { text: "¿A que estás esperando?" });
});
})
Expand Down

0 comments on commit fe2bb19

Please sign in to comment.