[FIX] 修復所有 E2E 模組測試的標題定位器以及將測試帳號還原為 admin 權限
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 55s
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 55s
This commit is contained in:
22
e2e/production.spec.ts
Normal file
22
e2e/production.spec.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { login } from './helpers/auth';
|
||||
|
||||
test.describe('生產管理模組', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await login(page);
|
||||
});
|
||||
|
||||
test('應能進入配方管理頁面並顯示主要元素', async ({ page }) => {
|
||||
await page.goto('/recipes');
|
||||
await expect(page.getByRole('heading', { name: /配方管理/ })).toBeVisible();
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: /新增/ })).toBeVisible();
|
||||
});
|
||||
|
||||
test('應能進入生產單管理頁面並顯示主要元素', async ({ page }) => {
|
||||
await page.goto('/production-orders');
|
||||
await expect(page.getByRole('heading', { name: /生產工單/ })).toBeVisible();
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: /建立生產單/ })).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user