Skip to content

Commit db625a1

Browse files
committed
test(lwc): drop Apex-specific Pass Rate assertion from run-all e2e
LWC run output is jest-style ("Test Suites:/Tests:") in the run's xterm output stream, not the Apex "Pass Rate" peek text. Assert the Test Results panel is auto-revealed + the tree item carries the (Passed) decoration instead. Fixes the e2e-desktop-run-tests failure on PR #7577.
1 parent 7a9852d commit db625a1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/salesforcedx-vscode-lwc/test/playwright/specs/lwcRunTests.desktop.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ test('LWC Run Tests: run all via Test Explorer and verify both suites pass', asy
123123
await waitForJestResults(workspaceDir, runStartMs!);
124124
await saveScreenshot(page, 'run-all.results.png');
125125

126-
// Native Test Controller surfaces results in the Test Results panel (auto-revealed on run).
126+
// Native Test Controller auto-reveals the Test Results panel on a code-lens/command/button run.
127+
// (Unlike Apex, the LWC run output is jest-style "Test Suites:/Tests:" written to the run's
128+
// xterm output stream — there is no "Pass Rate" text — so assert the panel is revealed, not its text.)
127129
const testResultsTab = page.locator(TEST_RESULTS_TAB);
128130
await testResultsTab.waitFor({ state: 'visible', timeout: 30_000 });
129131
await testResultsTab.click();
130132
await saveScreenshot(page, 'run-all.test-results-tab.png');
131-
await expect(page.getByText(/Pass Rate/i)).toBeVisible({ timeout: 60_000 });
132133

133134
// Native Test Controller marks the tree item passed (aria-label carries "(Passed)").
134135
await expect(page.getByRole('treeitem', { name: /lwc1/i })).toHaveAttribute('aria-label', /Passed/i, {

0 commit comments

Comments
 (0)