import { test, expect } from '@playwright/test' import { login, clickSubMenu, clickMenuItem, expectBasicList } from './utils/erpTestUtils' test.describe('采购计划需求表页面', () => { test('报表查询基础交互', async ({ page }) => { await login(page) await clickSubMenu(page, '生产计划') await clickMenuItem(page, '/production/report/need') await expect(page).toHaveURL(/\/production\/report\/need/) await expectBasicList(page) const dateRange = page.getByPlaceholder(/开始日期|结束日期|选择日期范围/).first().catch(() => null) if (dateRange) { await dateRange.click() await page.getByRole('button', { name: /今/ }).first().click().catch(() => {}) await page.getByRole('button', { name: /确 定|确定/ }).first().click().catch(() => {}) } await page.getByRole('button', { name: /搜索|查询/ }).click() await expect(page.locator('.el-table').first()).toBeVisible() }) })