style: refactor tests code to make it clean. But maybe this is can solve the problem in 404
This commit is contained in:
parent
fd4233f907
commit
1cac091a1c
|
@ -2,8 +2,6 @@
|
|||
import https from 'node:https'
|
||||
import { type Page, expect, test } from '@playwright/test'
|
||||
|
||||
const baseHost = process.env.BASE_URL || 'https://localhost:3000'
|
||||
|
||||
/* Global starting test config */
|
||||
|
||||
let page: Page
|
||||
|
@ -46,7 +44,7 @@ async function waitForServer(url: string, timeout = 150000) {
|
|||
test.beforeAll(async ({ browser }) => {
|
||||
console.log('Waiting for the server to start...')
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000))
|
||||
const baseURL = `${baseHost}`
|
||||
const baseURL = process.env.BASE_URL || 'https://localhost:3000'
|
||||
await waitForServer(baseURL)
|
||||
page = await browser.newPage()
|
||||
test.setTimeout(150000)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
import https from 'node:https'
|
||||
import { type Page, expect, test } from '@playwright/test'
|
||||
|
||||
const baseHost = process.env.BASE_URL || 'https://localhost:3000'
|
||||
|
||||
/* Global starting test config */
|
||||
|
||||
let page: Page
|
||||
|
@ -46,7 +44,7 @@ async function waitForServer(url: string, timeout = 150000) {
|
|||
test.beforeAll(async ({ browser }) => {
|
||||
console.log('Waiting for the server to start...')
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000))
|
||||
const baseURL = `${baseHost}`
|
||||
const baseURL = process.env.BASE_URL || 'https://localhost:3000'
|
||||
await waitForServer(baseURL)
|
||||
page = await browser.newPage()
|
||||
test.setTimeout(150000)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
import https from 'node:https'
|
||||
import { type Page, expect, test } from '@playwright/test'
|
||||
|
||||
const baseHost = process.env.BASE_URL || 'https://localhost:3000'
|
||||
|
||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||
let context: any
|
||||
let page: Page
|
||||
|
@ -48,7 +46,7 @@ async function waitForServer(url: string, timeout = 150000) {
|
|||
test.beforeAll(async ({ browser }) => {
|
||||
console.log('Waiting for the server to start...')
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000))
|
||||
const baseURL = `${baseHost}`
|
||||
const baseURL = process.env.BASE_URL || 'https://localhost:3000'
|
||||
await waitForServer(baseURL)
|
||||
context = await browser.newContext()
|
||||
page = await context.newPage()
|
||||
|
|
|
@ -46,7 +46,7 @@ async function waitForServer(url: string, timeout = 150000) {
|
|||
test.beforeAll(async ({ browser }) => {
|
||||
console.log('Waiting for the server to start...')
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000))
|
||||
const baseURL = `${baseHost}`
|
||||
const baseURL = process.env.BASE_URL || 'https://localhost:3000'
|
||||
await waitForServer(baseURL)
|
||||
page = await browser.newPage()
|
||||
test.setTimeout(150000)
|
||||
|
|
Loading…
Reference in New Issue
Block a user