Skip to content

Commit

Permalink
e2e test errors solved
Browse files Browse the repository at this point in the history
  • Loading branch information
UO287687 committed Apr 26, 2024
1 parent 547b278 commit b4927b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 13 additions & 1 deletion webapp/e2e/steps/friends.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,25 @@ defineFeature(feature, test => {
});

when('I fill the data in the form, press submit, press Friends and adds a friend', async () => {
await page.waitForSelector('input[name="username"]');
await expect(page).toFill('input[name="username"]', username);

await page.waitForSelector('input[name="password"]');
await expect(page).toFill('input[name="password"]', password);

await page.waitForSelector('input[name="confirmPassword"]');
await expect(page).toFill('input[name="confirmPassword"]', password);
await expect(page).toClick('button.btn', { text: '' });

await page.waitForSelector('button.btn');
await expect(page).toClick('button.btn', { text: '' });

await page.waitForSelector('div a');
await expect(page).toClick('div a', { text: 'Friends' });

await page.waitForSelector('.searchForm input');
await expect(page).toFill('.searchForm input', 'defaultuser');

await page.waitForSelector('button.btn');
await expect(page).toClick('button.btn', { text: '' });

});
Expand All @@ -59,6 +70,7 @@ defineFeature(feature, test => {
});

when('I am in Friends page and select the friend to remove', async () => {
await page.waitForSelector('.tableFriends button.btn');
await expect(page).toClick('.tableFriends button.btn', { text: 'Delete friend' });

});
Expand Down
6 changes: 0 additions & 6 deletions webapp/e2e/steps/i18n-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ defineFeature(feature, test => {
await page.waitForSelector('li', { text: 'Italiano' });
await expect(page).toClick('li', { text: 'Italiano' });
await expect(page).toMatchElement("span", { text: "Gioco Classico" });

await page.waitForSelector('div.languageButton', { text: '' });
await expect(page).toClick('div.languageButton', { text: '' });
await page.waitForSelector('li', { text: 'Francese' });
await expect(page).toClick('li', { text: 'Francese' });
await expect(page).toMatchElement("span", { text: "Jeu classique" });
});
})

Expand Down

0 comments on commit b4927b7

Please sign in to comment.