Skip to content

Fix smoke test flaky cases in slower runners#8665

Merged
cwangsmv merged 2 commits into
developfrom
fix/e2e-flaky-case-in-slow-runners
Apr 30, 2025
Merged

Fix smoke test flaky cases in slower runners#8665
cwangsmv merged 2 commits into
developfrom
fix/e2e-flaky-case-in-slow-runners

Conversation

@cwangsmv
Copy link
Copy Markdown
Contributor

Changes
Fix flaky smoke test cases, especially in slower runner.

@cwangsmv cwangsmv requested a review from ZxBing0066 April 30, 2025 02:49
ZxBing0066
ZxBing0066 previously approved these changes Apr 30, 2025
Copy link
Copy Markdown
Member

@ZxBing0066 ZxBing0066 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

await page.getByLabel('Create in collection').click();
await page.getByLabel('HTTP Request').click();
// check new request created
await page.getByTestId('New Request').isVisible();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious about this line, as I know page.getByTestId('New Request') will wait for the element to exist, why do we need to use isVisible() here? Is there anything that causes the element to be created but cannot be clicked? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the trace file screenshot,await page.getByTestId('New Request').dblclick(); clicks on the wrong element. So add a isVisible first to ensure that the newly created element appears on UI before double click.
Screenshot 2025-04-30 at 12 49 08

@cwangsmv cwangsmv force-pushed the fix/e2e-flaky-case-in-slow-runners branch from 9d744bb to 966eb67 Compare April 30, 2025 05:17
@cwangsmv cwangsmv merged commit 04256e2 into develop Apr 30, 2025
10 checks passed
@cwangsmv cwangsmv deleted the fix/e2e-flaky-case-in-slow-runners branch April 30, 2025 05:38
cwangsmv added a commit that referenced this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants