Add Playwright tests for Vulnerability UI#2567
Draft
niyazRedhat wants to merge 1 commit intoRedHatInsights:masterfrom
Draft
Add Playwright tests for Vulnerability UI#2567niyazRedhat wants to merge 1 commit intoRedHatInsights:masterfrom
niyazRedhat wants to merge 1 commit intoRedHatInsights:masterfrom
Conversation
Reviewer's GuideAdds a Playwright-based end-to-end test suite for the Vulnerability UI, including configuration, helpers, auth bootstrap, and npm scripts to run the tests with environment-driven base URL and proxy settings. Sequence diagram for Playwright auth setup and test executionsequenceDiagram
actor Dev
participant NPM as NPM_Scripts
participant PW as Playwright_CLI
participant CFG as Playwright_Config
participant SETUP as AuthSetup_Test
participant APP as Vulnerability_UI_App
participant STATE as StorageState_File
participant TESTS as Chromium_Tests
Dev->>NPM: run test:playwright
NPM->>PW: invoke playwright test
PW->>CFG: load configuration
CFG-->>PW: projects setup, chromium
PW->>SETUP: run setup project tests
SETUP->>APP: navigate to BASE_URL and perform login
APP-->>SETUP: returns authenticated session
SETUP->>STATE: save storageState to .auth/admin_user.json
SETUP-->>PW: setup complete
PW->>TESTS: run chromium project tests
TESTS->>STATE: load storageState
TESTS->>APP: open Vulnerability UI pages (CVEs, Systems, Reports)
APP-->>TESTS: render pages for assertions
TESTS-->>PW: report results
PW-->>Dev: output report (HTML/JSON or list)
Class diagram for the new Playwright test modulesclassDiagram
class PlaywrightConfig {
}
class AuthSetup {
}
class ConstantsHelper {
}
class FixturesHelper {
}
class LoginHelpers {
}
class NavHelpers {
}
class TestNavigation {
}
class TestCVEs {
}
PlaywrightConfig <.. AuthSetup : defines_project_setup
PlaywrightConfig <.. TestNavigation : configures_project
PlaywrightConfig <.. TestCVEs : configures_project
AuthSetup --> FixturesHelper : uses_fixtures
AuthSetup --> LoginHelpers : uses_login_helpers
FixturesHelper --> LoginHelpers : composes
FixturesHelper --> NavHelpers : composes
FixturesHelper --> ConstantsHelper : uses_constants
TestNavigation --> FixturesHelper : uses
TestNavigation --> NavHelpers : uses
TestNavigation --> ConstantsHelper : uses
TestCVEs --> FixturesHelper : uses
TestCVEs --> NavHelpers : uses
TestCVEs --> ConstantsHelper : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
5bf9d5e to
9757b3e
Compare
9757b3e to
e869835
Compare
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
_playwright-tests/folder with Playwright tests for Vulnerability UIplaywright.config.jswith Chromium, proxy support, and retry configplaywright_example.envtemplate for environment setupTest coverage
test_navigation.test.ts— navigation smoke tests (CVEs, Systems, Reports pages)test_cves.test.ts— CVEs page filter, search, pagination testsHow to run
See
_playwright-tests/README.mdfor full setup instructions.Status
🚧 WIP — tests being stabilized, not ready for review yet
Summary by Sourcery
Add Playwright-base testing support for the Vulnerability UI, including configuration, helpers, and navigation coverage for key pages.
Build:
Tests: