Skip to content

Commit

Permalink
Changed things
Browse files Browse the repository at this point in the history
  • Loading branch information
lauratbg committed Apr 26, 2024
1 parent 7b7d3fd commit 6b9bd36
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
11 changes: 6 additions & 5 deletions webapp/e2e/steps/addUser.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ defineFeature(feature, test => {
page = await browser.newPage();
setDefaultOptions({ timeout: 30000 });

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

beforeEach(async () => {
await logout(page);
await login(page, username, password);
})
beforeEach(async () => {
await logout(page);
await login(page, username, password);
})

test('Register', ({ given,when, then }) => {
given('I am on the add user page', async () => {
Expand Down
35 changes: 18 additions & 17 deletions webapp/e2e/steps/login.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,25 @@ const password = "testUserPassword"

defineFeature(feature, test => {

beforeAll(async () => {
browser = await puppeteer.launch({
headless: "new",
slowMo: 40,
defaultViewport: { width: 1920, height: 1080 },
args: ['--window-size=1920,1080']
});

page = await browser.newPage();
setDefaultOptions({ timeout: 30000 });

await register(page, email, username, password);
});
beforeAll(async () => {
browser = await puppeteer.launch({
headless: "new",
slowMo: 40,
defaultViewport: { width: 1920, height: 1080 },
args: ['--window-size=1920,1080']
});

page = await browser.newPage();
setDefaultOptions({ timeout: 30000 });

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

beforeEach(async () => {
await logout(page);
await login(page, username, password);
})

beforeEach(async () => {
await logout(page);
await login(page, username, password);
})

test('Login', ({ given,when, then }) => {
given('I am on the login page', async () => {
Expand Down

0 comments on commit 6b9bd36

Please sign in to comment.