Skip to content

test(e2e): resolve flaky tour tests#2058

Open
chintankavathia wants to merge 16 commits into
mainfrom
test/e2e/tour/flaky
Open

test(e2e): resolve flaky tour tests#2058
chintankavathia wants to merge 16 commits into
mainfrom
test/e2e/tour/flaky

Conversation

@chintankavathia
Copy link
Copy Markdown
Member

@chintankavathia chintankavathia commented May 13, 2026

chintankavathia and others added 14 commits May 12, 2026 13:36
…kerConfig

BREAKING CHANGE: `CriterionDefinition.datepickerConfig` type narrowed

The type of `datepickerConfig` in `CriterionDefinition` (filtered-search) changed from `DatepickerInputConfig` to `Omit<DatepickerInputConfig, 'enableDateRange' | 'enableTwoMonthDateRange'>`.

The properties `enableDateRange` and `enableTwoMonthDateRange ` are no longer accepted in `datepickerConfig` when used with filtered-search criteria, as they had no effect in that context.

Migration: Remove any `enableDateRange` and `enableTwoMonthDateRange` properties from your `datepickerConfig` objects passed to `CriterionDefinition`.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a helper function 'waitForTourStep' in the 'si-tour' end-to-end test suite to encapsulate the visibility checks for tour elements, improving test readability and maintainability. The reviewer suggested scoping the CSS selectors to the 'si-tour' component to ensure better test robustness, which is a valid improvement opportunity.

Comment thread playwright/e2e/element-examples/si-tour.spec.ts Outdated
@chintankavathia chintankavathia marked this pull request as ready for review May 14, 2026 06:23
@chintankavathia chintankavathia requested review from a team as code owners May 14, 2026 06:23
const waitForTourStep = async (hasArrow = true): Promise<void> => {
await expect(page.locator('si-tour .tour-content.show')).toBeVisible();
if (hasArrow) {
await expect(page.locator('si-tour .popover-arrow')).toBeVisible();
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.

will this help? I mean if step 1 has an arrow and step 2 has an arrow, I think it will remain visible but repositions

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

just realized visibility of arrow is not a problem but the offset calculation gets wrong sometimes for the first step.

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.

3 participants