Skip to content

Commit

Permalink
Improving things
Browse files Browse the repository at this point in the history
  • Loading branch information
lauratbg committed Apr 26, 2024
1 parent c082cfc commit ef8b784
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
5 changes: 1 addition & 4 deletions webapp/e2e/features/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ Feature: Login page functionality
Given I am on the login page
When I login as user
Then I am in /menu
Scenario: Failed login
Given I am on the login page
When I try to login
Then I am in /login

1 change: 0 additions & 1 deletion webapp/e2e/steps/addUser.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ defineFeature(feature, test => {
page = await browser.newPage();
setDefaultOptions({ timeout: 30000 });

await register(page, email, username, password);
}, 60000);

beforeEach(async () => {
Expand Down
23 changes: 11 additions & 12 deletions webapp/e2e/steps/login.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,17 @@ beforeEach(async () => {
});
}, 60000);

test('Failed login', ({ given,when, then }) => {
given('I am on the login page', async () => {
await page.goto('http://localhost:3000/login');
await page.waitForSelector('.general');
});
when('I try to login', async () => {
await login(page, email, "lau", "123");
});
then('I am in /login', async () => {
await expect(page).toMatchElement('.general');
}, 60000);
});
// test('Failed login', ({ given,when, then }) => {
// given('I am on the login page', async () => {
// await page.goto('http://localhost:3000/login');
// });
// when('I try to login', async () => {
// await login(page, email, "lau", "123");
// });
// then('I am in /login', async () => {
// await expect(page).toMatchElement('.general');
// }, 60000);
// });



Expand Down

0 comments on commit ef8b784

Please sign in to comment.