Skip to content

Conversation

@karangattu
Copy link
Collaborator

@karangattu karangattu commented Jul 14, 2025

This pull request enhances the reliability of Playwright tests by ensuring URL updates are confirmed after bookmarking actions and includes minor adjustments to test configurations and code comments. The most important changes are grouped below:

Bookmarking Tests Enhancements:

  • Added checks in multiple test files (e.g., test_accordion_bookmarking.py, test_input_checkbox_express_bookmarking.py, test_navsets_express_bookmarking.py) to verify that the URL updates correctly after clicking the bookmark button.

Minor Test Adjustments:

  • Added an additional expectation in test_navsets_bookmarking_demo to verify the value of a navigation set after bookmarking.

Codebase Maintenance:

  • Updated the get_apps function in example_apps.py to include a new runtime warning in the ignored warnings list.
  • Modified the chatlas/app.py file to explicitly set turns for the ChatOpenAI client, improving clarity and avoiding potential type issues.

Introduced a shared wait_for_url_change utility and updated all relevant Playwright bookmark tests to wait for the URL to change after clicking the bookmark button. This improves test reliability by ensuring the bookmark action completes before proceeding. Also added missing __init__.py files to ensure proper package structure.
@karangattu karangattu requested a review from schloerke July 14, 2025 15:45
Replaces usage of the wait_for_url_change helper with direct calls to page.wait_for_url in all relevant tests. Removes the now-unnecessary bookmark_utils.py and associated __init__.py files, simplifying the test codebase.
Deleted the __init__.py file from tests/playwright as it is no longer needed to mark the directory as a package.
Removed the import and usage of the custom wait_for_url_change utility and replaced it with Playwright's built-in page.wait_for_url method for improved reliability and simplicity.
Eliminated the use and import of stat_smooth in the static_plots example app, simplifying the plot output to only include points and facets.
@karangattu karangattu changed the title fix(tests): Refactor bookmark tests to wait for URL change fix(tests): Fix several failing tests Jul 14, 2025
@cpsievert
Copy link
Collaborator

removing a deprecated statistical smoothing method

Where did you read that stat_smooth() was deprecated? It's featured on the README?

@cpsievert
Copy link
Collaborator

Running the revelant example, I see:

Screenshot 2025-07-14 at 4 43 36 PM

So it seems the warnings are just notifying that there's not enough points for smoothing in some groups. Is there a way to ignore the warnings?

@karangattu
Copy link
Collaborator Author

removing a deprecated statistical smoothing method

Where did you read that stat_smooth() was deprecated? It's featured on the README?

The trouble with using Github to come up with PR descriptions because I am lazy... I closed a PR that removed the smooth function #2025 which seemed to fix the tests, but let me look into ignoring the warnings just for that app and for those specific warnings

Added back stat_smooth with linear model to the ggplot in the static_plots example app. Updated example test to allow a new RuntimeWarning related to insufficient data points for line fitting.
@karangattu
Copy link
Collaborator Author

@cpsievert I have ignored the warnings now and reverted the stat_smooth use in the plots like before.

@karangattu karangattu requested a review from cpsievert July 15, 2025 05:07
@cpsievert
Copy link
Collaborator

Thanks!

@cpsievert cpsievert merged commit f097d97 into main Jul 15, 2025
55 checks passed
@cpsievert cpsievert deleted the fix-failing-tests branch July 15, 2025 15:10
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