swap before/after
This commit is contained in:
parent
fb6a6d0d47
commit
765d5ac73f
|
|
@ -731,12 +731,12 @@ export const test = base.extend({
|
||||||
import { test as base } from '@playwright/test';
|
import { test as base } from '@playwright/test';
|
||||||
|
|
||||||
export const test = base.extend({
|
export const test = base.extend({
|
||||||
sharedAfterEach: [async ({ page, baseURL }, use) => {
|
sharedBeforeEach: [async ({ page, baseURL }, use) => {
|
||||||
await page.goto(baseURL);
|
await page.goto(baseURL);
|
||||||
await use();
|
await use();
|
||||||
}, { scope: 'test', auto: true } ], // starts automatically before every test, we pass "auto" for that.
|
}, { scope: 'test', auto: true } ], // starts automatically before every test, we pass "auto" for that.
|
||||||
|
|
||||||
sharedBeforeEach: [async ({ page }, use) => {
|
sharedAfterEach: [async ({ page }, use) => {
|
||||||
await use();
|
await use();
|
||||||
console.log('Test final URL:', page.url());
|
console.log('Test final URL:', page.url());
|
||||||
}, { scope: 'test', auto: true } ], // starts automatically after every test, we pass "auto" for that.
|
}, { scope: 'test', auto: true } ], // starts automatically after every test, we pass "auto" for that.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue