Files
vue-ts-example/tests/playwright/api-page.spec.ts
严浩 6e18e0f737
All checks were successful
/ build-and-deploy-to-vercel (push) Successful in 3m18s
/ lint-build-and-check (push) Successful in 4m16s
/ surge (push) Successful in 2m46s
/ playwright (push) Successful in 5m34s
feat: 添加 headless 测试支持和修复接口请求页面的路径
2025-03-31 12:36:39 +08:00

10 lines
372 B
TypeScript

import { expect, test } from '@playwright/test';
test('接口请求页面', async ({ page }) => {
await page.goto('/Page/API');
// /fake-api 正常返回。
await expect(page.locator('pre')).toContainText('http://dummyimage.com/200x200');
// // /npm-registry-api 正常返回。
// await expect(page.locator('#app')).toContainText('@vue/babel-plugin-jsx');
});