| 12345678910111213 |
- import { test } from '@playwright/test';
- // BUG-11 修复:使用 data-testid 兜底
- const CHIP_LOCATOR = '[data-testid="example-chip"], .example-chip';
- test('精简后页面截图', async ({ page }) => {
- await page.goto('http://localhost:5173/#/pages/book-generator/create', { waitUntil: 'networkidle' });
- await page.waitForSelector(CHIP_LOCATOR, { timeout: 15000 });
- // 等动画结束、轮播进入稳态
- await page.waitForTimeout(1500);
- await page.screenshot({ path: 'tests/page-after-cleanup.png', fullPage: true });
- console.log('截图已保存');
- });
|