Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "testsolar-oss-playwright",
"version": "0.2.23",
"version": "0.2.24",
"description": "TestSolar support for playwright tool",
"main": "main.js",
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion playwright/src/playwrightx/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,9 @@ export function createTestResults(
const testResults: TestResult[] = [];
const casePrefix = getTestcasePrefix();

// 检查是否为 fileMode
const fileMode = process.env.TESTSOLAR_TTP_FILEMODE == "1";

// 首先找出参考失败用例(output中的key不在testIdentifiers中的)
let referenceFailedTest: TestResult | null = null;

Expand All @@ -731,7 +734,14 @@ export function createTestResults(
const fullTestPath = `${casePrefix}${testCase}`;

// 判断当前测试用例是否在testIdentifiers中
const isInTestIdentifiers = testIdentifiers.includes(testCase);
let isInTestIdentifiers = testIdentifiers.includes(testCase);

// 在 fileMode 下,需要检查测试用例是否属于指定的文件
if (fileMode && !isInTestIdentifiers) {
// 提取测试用例的文件路径部分(问号之前的部分)
const testFilePath = testCase.split('?')[0];
isInTestIdentifiers = testIdentifiers.includes(testFilePath);
}

// 处理每个结果
for (const result of results) {
Expand Down
2 changes: 1 addition & 1 deletion playwright/testtool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schemaVersion: 1.0
name: playwright
nameZh: Playwright自动化测试
lang: javascript
version: '0.2.23'
version: '0.2.24'
defaultBaseImage: node:18
langType: INTERPRETED
description: |-
Expand Down