Skip to content

Commit e261388

Browse files
author
Curry
committed
fix: set production mode for standalone smoke server
1 parent 1671871 commit e261388

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

frontend/e2e/login.spec.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { expect, test } from '@playwright/test'
22

33
test('login page renders its local administrator credentials form', async ({ page }) => {
4-
page.on('pageerror', (error) => console.log('pageerror', error.message))
5-
const response = await page.goto('/login')
6-
console.log('login response', response?.status(), page.url(), (await page.content()).slice(0, 2000))
4+
await page.goto('/login')
75
await expect(page.locator('[data-slot="card-title"]')).toBeVisible({ timeout: 15_000 })
86
await expect(page.getByLabel('用户名')).toHaveValue('admin')
97
await expect(page.getByLabel('密码')).toBeVisible()

frontend/playwright.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default defineConfig({
1010
command: 'node .next/standalone/server.js',
1111
env: {
1212
HOSTNAME: '127.0.0.1',
13+
NODE_ENV: 'production',
1314
PORT: '3000',
1415
},
1516
url: 'http://127.0.0.1:3000',

0 commit comments

Comments
 (0)