Skip to content

Conversation

@emmaaroche
Copy link
Contributor

@emmaaroche emmaaroche commented Jan 22, 2026

Description

  • Added UI tests for the console plugin Overview page
  • Implemented page objects following the navigator pattern for Overview page resources (Gateways, HTTPRoutes, and Policies)
  • Refactored UI tests to share login authentication across all UI tests
  • Refactored UI test's client to have a longer connect timeout time to fix errors occurring in nightlies

Closes #839

UI test issue: #556

Changes

Tests

  • test_getting_started_section: Verifies all Getting Started resource cards and documentation links are present and correct
  • test_gateways_section: Validates Gateway status metrics (Total, Healthy, Unhealthy) are displayed
  • test_gateways_analysis_section: Creates Gateway via UI, verifies metrics update and Gateway becomes healthy, then deletes it
  • test_policies_section: Creates policy via UI, verifies it appears in overview and enforces correctly, then deletes it (uses RateLimitPolicy as sample since other policies tested separately)
  • test_httproute_section: Creates HTTPRoute via UI, verifies it appears in overview, then deletes it

New Features

  • Page Objects: Implemented OverviewPage, GatewayNewPageYaml, HTTPRouteNewPageYaml, and PolicyDetailsPage for CRUD support
  • Base Resource Class: Created BaseResourceNewPageYaml base class providing shared editor interaction and delete functionality

Refactoring

  • Login/Authentication Optimization: Implemented Playwright storage state pattern to login once per test session and reuse authentication across all UI tests, significantly reducing test execution time
  • Shared Conftest: Moved conftest.py from policies/ to parent console_plugin/ directory to share authentication state across all UI tests

Verification steps

Run the new Overview page tests:

poetry run pytest -vv -n4 testsuite/tests/singlecluster/ui/console_plugin/overview/test_overview.py

Run all UI tests to verify shared conftest changes don't break existing policy tests:

make ui

Run using the UI Container test image:

docker run --rm \
    -v /tmp/ocp/kubeconfig.kua-420-2:/run/kubeconfig:ro \
    -v $(pwd)/config/settings.local.yaml:/run/secrets.yaml:ro \
    -v $(pwd)/test-run-results:/test-run-results \
    quay.io/rh-ee-eroche/testsuite-ui:unstable

@emmaaroche emmaaroche self-assigned this Jan 22, 2026
@emmaaroche emmaaroche added the Test case New test case label Jan 22, 2026
@emmaaroche emmaaroche force-pushed the overview-page-ui-tests branch 2 times, most recently from 1cb397f to 265312e Compare January 23, 2026 13:06
Signed-off-by: emmaaroche <eroche@redhat.com>
@emmaaroche emmaaroche force-pushed the overview-page-ui-tests branch from 265312e to b1ff550 Compare January 26, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Test case New test case

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize UI test authentication to avoid repeated login

1 participant