Skip to content

Commit fd7a042

Browse files
Anton StandrikAnton Standrik
authored andcommitted
fix: skipped tests
1 parent 819cfcf commit fd7a042

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,15 @@ jobs:
241241
fi
242242
}
243243
244+
# Get skipped tests first from test results
245+
if [ -f "playwright-artifacts/test-results.json" ]; then
246+
while IFS= read -r test; do
247+
if [[ -n "$test" ]]; then
248+
skipped_tests+=("$test")
249+
fi
250+
done < <(jq -r '.suites[].specs[] | select(.ok == false and .skipped == true) | .title' playwright-artifacts/test-results.json)
251+
fi
252+
244253
# Get list of changed test files
245254
for file in $(git diff --name-only main...HEAD | grep -E '^tests/suites/.*\.(spec|test)\.(ts|tsx|js|jsx)$'); do
246255
# Get test names from both versions
@@ -258,18 +267,14 @@ jobs:
258267
259268
while IFS= read -r test; do
260269
if [[ -n "$test" ]]; then
261-
if ! echo "$current_tests" | grep -Fxq "$test"; then
270+
# Only mark as deleted if it's not in current tests AND not in skipped tests
271+
if ! echo "$current_tests" | grep -Fxq "$test" && ! printf '%s\n' "${skipped_tests[@]}" | grep -Fxq "$test"; then
262272
deleted_tests+=("$test")
263273
fi
264274
fi
265275
done <<< "$base_tests"
266276
done
267277
268-
# Get skipped tests from test results
269-
if [ -f "playwright-artifacts/test-results.json" ]; then
270-
skipped_tests=($(jq -r '.suites[].specs[] | select(.ok == false and .skipped == true) | .title' playwright-artifacts/test-results.json))
271-
fi
272-
273278
# Create JSON output
274279
echo "added_tests=$(IFS=,; echo "${added_tests[*]}")" >> $GITHUB_OUTPUT
275280
echo "deleted_tests=$(IFS=,; echo "${deleted_tests[*]}")" >> $GITHUB_OUTPUT
@@ -345,10 +350,13 @@ jobs:
345350
|:-----:|:------:|:------:|:-----:|:-------:|
346351
| ${testResults.total} | ${testResults.passed} | ${testResults.failed} | ${testResults.flaky} | ${changesText} |
347352
348-
### Test Changes Details
353+
<details>
354+
<summary>📋 Test Changes Details</summary>
355+
349356
${addedCount > 0 ? `\n✨ **Added Tests (${addedCount}):**\n${addedTests.map(t => `- ${t}`).join('\n')}` : ''}
350357
${deletedCount > 0 ? `\n🗑️ **Deleted Tests (${deletedCount}):**\n${deletedTests.map(t => `- ${t}`).join('\n')}` : ''}
351358
${skippedCount > 0 ? `\n⏭️ **Skipped Tests (${skippedCount}):**\n${skippedTests.map(t => `- ${t}`).join('\n')}` : ''}
359+
</details>
352360
353361
### Bundle Size: ${bundleStatus}
354362
Current: ${formatSize(currentSize)} | Main: ${formatSize(mainSize)}

tests/suites/tenant/queryEditor/models/QueryEditor.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,11 @@ export class QueryEditor {
109109
async clickRunButton() {
110110
await this.runButton.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
111111
await this.runButton.click();
112-
await this.page.waitForTimeout(1000);
113112
}
114113

115114
async clickExplainButton() {
116115
await this.explainButton.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
117116
await this.explainButton.click();
118-
await this.page.waitForTimeout(1000);
119117
}
120118

121119
async getExplainResult(type: ExplainResultType) {

tests/suites/tenant/queryEditor/queryTemplates.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ test.describe('Query Templates', () => {
6161

6262
// Try to run the query
6363
await queryEditor.clickRunButton();
64+
await page.waitForTimeout(500);
6465

6566
try {
6667
// Wait for either Completed or Failed status

0 commit comments

Comments
 (0)