Skip to content

Commit

Permalink
moved beforeEach
Browse files Browse the repository at this point in the history
  • Loading branch information
yairEO committed May 6, 2024
1 parent 20968f3 commit 9c9df62
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/basic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ const getPageDOM = async (page) => {
DOM.origInput = await page.locator('input[value]')
}

test.beforeEach(async ({ page }) => {
await page.goto('file:///C:/Users/vsync/projects/tagify/docs/examples/src/example-template.html')
await loadHTML_basic(page)
await getPageDOM(page)
})

//////////////////////////////////////////////////////////////////////
// tests helpers

Expand All @@ -58,6 +52,12 @@ async function assertHasTags(page, ...expectedTags) {
// actual tests

test.describe('basic', () => {
test.beforeEach(async ({ page }) => {
await page.goto('file:///C:/Users/vsync/projects/tagify/docs/examples/src/example-template.html')
await loadHTML_basic(page)
await getPageDOM(page)
})

test('should recieve focus via `autofocus` input attribute', async ({ page }) => {
// Assertion 2: Check 'autofocus' presence
await expect(DOM.origInput).toHaveAttribute('autofocus', '')
Expand Down

0 comments on commit 9c9df62

Please sign in to comment.