[playwright] OUIA and updated readme#106
Conversation
Reviewer's GuideThis PR integrates Playwright as the browser engine, fully revamps project documentation and testing instructions, refactors OUIA tests for Playwright compatibility, updates CI configuration for auto-parallel runs and Codecov reporting, and removes legacy Selenium code and options along with its dependency. Entity relationship diagram for test options after Selenium removalerDiagram
TEST_OPTION {
string browser
string pf_version
boolean headless
int slowmo
int n
}
TEST_OPTION ||--o| TEST_RUN : configures
TEST_RUN {
datetime start_time
datetime end_time
string status
}
Class diagram for FormSelect after Selenium removalclassDiagram
class FormSelect {
+all_enabled_options()
+fill(value)
}
%% Note: _select_element property removed
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
Blocking issues:
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
General comments:
- Verify that removing the selenium dependency hasn’t left any residual imports or code paths relying on Selenium to avoid runtime errors.
- Ensure pytest-xdist is installed in your CI setup so that the new '-n auto' flag actually enables parallel test execution.
- Double-check the impact of removing the
_select_elementproperty in FormSelect to ensure no downstream code relies on it, or provide a deprecation alias if needed.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Verify that removing the selenium dependency hasn’t left any residual imports or code paths relying on Selenium to avoid runtime errors.
- Ensure pytest-xdist is installed in your CI setup so that the new '-n auto' flag actually enables parallel test execution.
- Double-check the impact of removing the `_select_element` property in FormSelect to ensure no downstream code relies on it, or provide a deprecation alias if needed.
## Individual Comments
### Comment 1
<location> `.github/workflows/tests.yaml:85` </location>
<code_context>
uses: codecov/codecov-action@v4
</code_context>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature-playwright #106 +/- ##
=====================================================
Coverage ? 97.77%
=====================================================
Files ? 48
Lines ? 1931
Branches ? 0
=====================================================
Hits ? 1888
Misses ? 43
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if: matrix.run-coverage == true | ||
| timeout-minutes: 25 | ||
| run: | | ||
| pytest -v -n 2 --headless --browser=${{ matrix.browser }} --pf-version=${{ matrix.pf-version }} --cov=./ --cov-report=xml --reruns 2 --reruns-delay 5 |
There was a problem hiding this comment.
Consider (separate PR) adding a hatch config so we can just use hatch run test and hatch run test-cov and can set many of these options as default.
Summary by Sourcery
Revise documentation to incorporate Playwright-based testing, clean up obsolete code and dependencies, enhance modal tests for OUIA compliance, and modernize the CI workflow with dynamic parallelism and coverage reporting.
Enhancements:
CI:
Documentation:
Tests:
Chores: