Merged
Conversation
Reviewer's GuideThis PR replaces the rod-based UI tests with a Playwright-Go framework, introduces a BrowserTest abstraction for reusable search routines, adds multi-browser support via environment variables, simplifies test data extraction using regex, and updates dependencies and build scripts accordingly. Class diagram for BrowserTest abstraction and Playwright integrationclassDiagram
class BrowserTest {
+browserName: string
+page: playwright.Page
+Launch()
+Navigate(url string)
+SearchByEmail(email string)
+SearchByHash(hash string)
+SearchByLogIndex(index string)
+SearchByUUID(uuid string)
+SearchByCommitSHA(sha string)
+TakeScreenshot(name string)
}
class Playwright {
+Install()
+LaunchBrowser(name string)
+Close()
}
BrowserTest --|> Playwright : uses
Class diagram for updated environment variable configurationclassDiagram
class Values {
+SetDefault(key string, value string)
+AutomaticEnv()
}
Values : +TestFirefox = "TEST_FIREFOX"
Values : +TestSafari = "TEST_SAFARI"
Values : +TestEdge = "TEST_EDGE"
Values : +HeadlessUI = "HEADLESS_UI"
Values : +RegistryImage = "REGISTRY_IMAGE"
Values : +TsaURL = "TSA_URL"
Values : +ManualImageSetup = "MANUAL_IMAGE_SETUP"
Values : +CosignImage = "COSIGN_IMAGE"
Values : +DockerRegistryUsername = "REGISTRY_USERNAME"
Values : +DockerRegistryPassword = "REGISTRY_PASSWORD"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Member
Author
|
Waiting for upstream to resolve email search limitation issue |
027a977 to
55fedbd
Compare
cec9819 to
2f35090
Compare
Signed-off-by: Kristián Da Costa Menezes <113685889+kdacosta0@users.noreply.github.com>
There was a problem hiding this comment.
Hey @kdacosta0 - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `scripts/Makefile:40` </location>
<code_context>
-tuf-repo:
- @echo "Running manual TUF repository test..."
- go test -v ./test/tuftool
+setup:
+ @echo "Installing Playwright dependencies..."
+ @npm install @playwright/test
+ @npx playwright install --with-deps
+ @go run github.com/playwright-community/playwright-go/cmd/playwright install
-.PHONY: build test test-tuf-repo all
</code_context>
<issue_to_address>
The setup target mixes npm and Go-based Playwright installation.
Standardize on either npm or Go for Playwright installation to prevent redundancy and version conflicts.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
setup:
@echo "Installing Playwright dependencies..."
@npm install @playwright/test
@npx playwright install --with-deps
@go run github.com/playwright-community/playwright-go/cmd/playwright install
=======
setup:
@echo "Installing Playwright dependencies..."
@npm install @playwright/test
@npx playwright install --with-deps
>>>>>>> REPLACE
</suggested_fix>
### Comment 2
<location> `pkg/api/values.go:28` </location>
<code_context>
RegistryImage = "REGISTRY_IMAGE"
TsaURL = "TSA_URL"
HeadlessUI = "HEADLESS_UI"
+ TestFirefox = "TEST_FIREFOX"
+ TestSafari = "TEST_SAFARI"
+ TestEdge = "TEST_EDGE"
// 'DockerRegistry*' - Login credentials for 'registry.redhat.io'.
</code_context>
<issue_to_address>
New browser test environment variables default to 'true'.
Defaulting these variables to 'true' could cause tests to run and fail if the browsers aren't present. Consider using 'false' as the default or clearly documenting the browser requirements.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
Values.SetDefault(TestFirefox, "true")
Values.SetDefault(TestSafari, "true")
Values.SetDefault(TestEdge, "true")
=======
Values.SetDefault(TestFirefox, "false")
Values.SetDefault(TestSafari, "false")
Values.SetDefault(TestEdge, "false")
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
kdacosta0
commented
Jul 7, 2025
kdacosta0
commented
Jul 9, 2025
Signed-off-by: Kristián Da Costa Menezes <113685889+kdacosta0@users.noreply.github.com>
petrpinkas
requested changes
Jul 15, 2025
Signed-off-by: Kristian Da Costa Menezes <kdacosta@redhat.com>
petrpinkas
approved these changes
Jul 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Migrate and refactor the Rekor Search UI end-to-end tests to use Playwright for real cross-browser support, update configuration and build scripts, and clean up obsolete dependencies
Enhancements:
Build: