style: 更新 .editorconfig 文件配置
- 扩展配置到更多文件类型,包括 CSS 预处理器文件 - 添加 end_of_line 和 max_line_length 设置 - 统一使用 LF 换行符 - 设置最大行长度为 120 字符
This commit is contained in:
9
e2e/playwright/api-page.spec.ts
Normal file
9
e2e/playwright/api-page.spec.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
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');
|
||||
});
|
18
e2e/playwright/test-1.spec.ts
Normal file
18
e2e/playwright/test-1.spec.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { consola } from 'consola';
|
||||
|
||||
test('页面加载正常', async ({ page }, testInfo) => {
|
||||
await page.goto('/Home');
|
||||
|
||||
// await expect(page.getByRole('link', { name: '中文-页面.page.vue' })).toBeVisible();
|
||||
|
||||
// 截图并将其附加到测试结果
|
||||
await testInfo.attach('screenshot', { body: await page.screenshot({ fullPage: true }), contentType: 'image/png' });
|
||||
|
||||
// 查找包含"commit:"文本的元素
|
||||
const commitElement = page.locator('text=commit:').first();
|
||||
// 获取元素的文本内容
|
||||
const innerText = await commitElement.textContent();
|
||||
consola.debug(`Commit 文本内容: "${innerText}"`);
|
||||
expect(innerText).toContain('commit:');
|
||||
});
|
Reference in New Issue
Block a user