Skip to content

Fix tests - #173

Merged
mshriver merged 2 commits into
RedHatQE:mainfrom
LightOfHeaven1994:fix-tests
Jul 28, 2026
Merged

Fix tests#173
mshriver merged 2 commits into
RedHatQE:mainfrom
LightOfHeaven1994:fix-tests

Conversation

@LightOfHeaven1994

@LightOfHeaven1994 LightOfHeaven1994 commented Mar 31, 2023

Copy link
Copy Markdown
Collaborator

This PR is supposed to fix all unit tests that are failing right now. OUIA tests are not relevant as they were run against custom page so they were deleted. Official doc page doesn't have concrete OUIA IDs set.
But we are ready to use OUIA tests in WP5 when repo created patternfly/patternfly-react#8893 .

Summary by Sourcery

Update UI integration tests to align with the current Patternfly React demo pages and remove obsolete OUIA tests.

Bug Fixes:

  • Fix failing widgetastic_patternfly4 tests by updating demo URLs, locators, and expectations to match the latest Patternfly React examples.

Tests:

  • Adjust multiple component test suites (tables, chip groups, charts, navigation, dropdowns, titles, form selects, etc.) to the new Patternfly React main demo structure and data.
  • Delete outdated OUIA-based tests that no longer correspond to the official documentation pages.

@LightOfHeaven1994
LightOfHeaven1994 marked this pull request as draft March 31, 2023 14:51
@LightOfHeaven1994
LightOfHeaven1994 force-pushed the fix-tests branch 8 times, most recently from fd49024 to 961fde2 Compare May 29, 2023 14:51
@mshriver
mshriver marked this pull request as ready for review July 28, 2026 18:02

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The TESTING_PAGE_URL value is now updated to the patternfly-react-main.surge.sh host in many files; consider centralizing this base URL (or deriving it from a single helper/config) to make future host changes less error-prone.
  • Several tests were weakened or removed entirely (e.g. test_compound_expandable_table no longer asserts expanded table content, test_switch_fill no longer checks selected, chips_view tests were deleted); if these scenarios are no longer supported in the example pages, it may be worth updating the tests to validate the new behavior rather than dropping the assertions so that regressions in widget behavior are still caught.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `TESTING_PAGE_URL` value is now updated to the `patternfly-react-main.surge.sh` host in many files; consider centralizing this base URL (or deriving it from a single helper/config) to make future host changes less error-prone.
- Several tests were weakened or removed entirely (e.g. `test_compound_expandable_table` no longer asserts expanded table content, `test_switch_fill` no longer checks `selected`, `chips_view` tests were deleted); if these scenarios are no longer supported in the example pages, it may be worth updating the tests to validate the new behavior rather than dropping the assertions so that regressions in widget behavior are still caught.

## Individual Comments

### Comment 1
<location path="testing/test_chartline.py" line_range="19-21" />
<code_context>
-pytestmark = pytest.mark.skip("No OUIA IDs provided on Patternfly testing page")
-
-
-@pytest.fixture()
-def modal(browser):
-    class ModalTestView(View):
</code_context>
<issue_to_address>
**suggestion (testing):** Removing the explicit sleep may reintroduce flakiness if the line chart data loads asynchronously

The old fixture used `sleep(3)` to let the chart data settle (especially in Firefox). With the new `view` fixture we now read legends/data immediately. If the chart still populates asynchronously, this can reintroduce flakiness. Please add a proper wait (e.g., wait for the expected number of legends or for `read()` to return non-empty data) instead of a fixed sleep to keep the test stable.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread testing/test_chartline.py
- Remove OUIA tests as we dont have OUIA IDs available in official doc
  page
- Fix doc links to point on latest doc
- Fix tests

Co-authored-by: Claude <noreply@anthropic.com>
@RedHatQE RedHatQE deleted a comment from sourcery-ai Bot Jul 28, 2026
@LightOfHeaven1994

Copy link
Copy Markdown
Collaborator Author

@mshriver whaaat, 3 years ago 😄

@mshriver

Copy link
Copy Markdown
Contributor

yep, some teams are still using it and I just released widgetastic.core 1.2.1 to handle the wait_for 2.x change to timeout types.

@mshriver
mshriver merged commit 525b513 into RedHatQE:main Jul 28, 2026
2 of 10 checks passed
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