Skip to content

Commit c71bee5

Browse files
committed
fix: harden settings.wdio.ts for slow CI + sanitize malformed JUnit XML
- Add proper app-ready wait in settings.wdio.ts before hook (sidebar waitForDisplayed + button waitForClickable), matching the robust pattern used by settings-desktop.wdio.ts - Remove specFileRetries (leaves malformed XML from failed first attempts that crashes dorny/test-reporter) - Add JUnit XML sanitization step in e2e-desktop CI workflow to remove files missing <testsuites> before the report job processes them https://claude.ai/code/session_01N5WUgi8V1zVQBHVw96eVzM Signed-off-by: Claude <noreply@anthropic.com>
1 parent c8f6acd commit c71bee5

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

.github/workflows/e2e-desktop.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,20 @@ jobs:
162162
pattern: e2e-desktop-results-*
163163
path: test-results
164164

165+
# Remove malformed/empty JUnit XMLs that crash dorny/test-reporter.
166+
# This can happen when tauri-driver crashes mid-spec and the JUnit
167+
# reporter writes incomplete XML (missing testsuites or test names).
168+
- name: Sanitize JUnit XML reports
169+
if: always()
170+
run: |
171+
for f in test-results/e2e-desktop-results-*/reports/*.xml; do
172+
[ -f "$f" ] || continue
173+
if ! grep -q '<testsuites' "$f" 2>/dev/null; then
174+
echo "Removing malformed JUnit XML: $f"
175+
rm "$f"
176+
fi
177+
done
178+
165179
- name: 'Report: E2E Desktop Tests (Linux)'
166180
uses: dorny/test-reporter@v2
167181
if: always()

tests/e2e/specs/settings.wdio.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
* Uses data-testid only (ADR-003).
44
*/
55

6-
import { byTestId } from '../helpers/selectors';
6+
import { byTestId, TIMEOUT } from '../helpers/selectors';
77

88
describe('Settings Page', () => {
99
before(async () => {
10+
// Wait for app to fully load (on CI, app startup can be slower after many prior specs)
11+
await browser.pause(3000);
12+
const sidebar = await byTestId('sidebar');
13+
await sidebar.waitForDisplayed({ timeout: TIMEOUT.veryLong });
14+
1015
const settingsBtn = await byTestId('nav-settings');
16+
await settingsBtn.waitForClickable({ timeout: TIMEOUT.medium });
1117
await settingsBtn.click();
1218
await browser.pause(2000);
1319
});

tests/e2e/wdio.conf.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,6 @@ export const config: Options.Testrunner = {
298298
specs: ['./specs/**/*.wdio.ts'],
299299
exclude: [],
300300

301-
// Retry failed spec files once to handle transient CI failures
302-
// (e.g., WebKit2GTK driver crashes, timing issues on slow CI runners)
303-
specFileRetries: process.env.CI ? 1 : 0,
304-
305301
maxInstances: 1, // Tauri only supports one instance
306302

307303
capabilities: [

0 commit comments

Comments
 (0)