-
Notifications
You must be signed in to change notification settings - Fork 18
tests: backport global.setup for ui #686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
tests: backport global.setup for ui #686
Conversation
Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com>
Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com>
Reviewer's GuideThis PR backports the UI global.setup from trustify-tests by introducing a dedicated Playwright project for UI-based data ingestion, updating UI test dependencies and login flow, and refining API setup logging to support initial SBOM and advisory uploads via the UI. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #686 +/- ##
==========================================
+ Coverage 57.28% 59.35% +2.06%
==========================================
Files 146 149 +3
Lines 2430 2465 +35
Branches 552 556 +4
==========================================
+ Hits 1392 1463 +71
+ Misses 833 789 -44
- Partials 205 213 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- In playwright.config.ts, make sure you update the dependencies for all UI test projects (e.g., Firefox) to use "setup-ui-data" so every browser runs the UI setup.
- The uploadSboms and uploadAdvisories functions share a lot of logic; consider extracting the common file-upload flow into a shared helper to reduce duplication.
- Avoid the non-null assertion on baseURL by providing a fallback or ensuring the environment always supplies it, rather than disabling the lint rule.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In playwright.config.ts, make sure you update the dependencies for all UI test projects (e.g., Firefox) to use "setup-ui-data" so every browser runs the UI setup.
- The uploadSboms and uploadAdvisories functions share a lot of logic; consider extracting the common file-upload flow into a shared helper to reduce duplication.
- Avoid the non-null assertion on baseURL by providing a fallback or ensuring the environment always supplies it, rather than disabling the lint rule.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Although we can setup the initial upload of files though the API, doing it though the UI does not force users to enable the
PLAYWRIGHT_AUTH_CLIENT_ID
andPLAYWRIGHT_AUTH_URL
environment variables.As a side note. Doing the setup through the UI also indirectly tests the Upload pages.
Summary by Sourcery
Backport the UI global.setup from trustify-tests to configure initial SBOM and advisory data ingestion via the UI and update Playwright to run these setup steps before other tests.
New Features:
Enhancements:
Tests: