Skip to content

refactor: Update login flow for UI tests#856

Merged
emmaaroche merged 1 commit intoKuadrant:mainfrom
emmaaroche:update-ui-login-flow
Feb 12, 2026
Merged

refactor: Update login flow for UI tests#856
emmaaroche merged 1 commit intoKuadrant:mainfrom
emmaaroche:update-ui-login-flow

Conversation

@emmaaroche
Copy link
Contributor

@emmaaroche emmaaroche commented Feb 3, 2026

Description

  • Refactored UI tests to log in once per session and reuse authentication state across all tests, helping to reduce test execution time
  • Moved conftest.py from policies/ to parent console_plugin/ directory to apply authentication to all UI test subdirectories
  • Added OpenShift exposer check to skip UI tests on non-OpenShift environments (Kind/Kubernetes)
  • Added console plugin installation and enablement verification with skip/fail conditions
  • Added .playwright-auth/ session cache to .gitignore and .dockerignore
  • Added back UI pytest marker definition to pyproject.toml

Closes #839

Verification steps

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

make ui

or

Run alll tests using the UI Container 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 Feb 3, 2026
@emmaaroche emmaaroche added the refactor Refactor with same functionality label Feb 3, 2026
@emmaaroche
Copy link
Contributor Author

emmaaroche commented Feb 3, 2026

@averevki This PR addresses your comments: #850 (comment) and #850 (comment)

@emmaaroche emmaaroche force-pushed the update-ui-login-flow branch 5 times, most recently from 8f30184 to 3bbc993 Compare February 5, 2026 17:18
@emmaaroche emmaaroche force-pushed the update-ui-login-flow branch from 3bbc993 to d428207 Compare February 5, 2026 18:16
averevki
averevki previously approved these changes Feb 5, 2026
Copy link
Contributor

@averevki averevki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good improvement. Do you have any data on how faster it's making tests run? (it's okay if not :))

@emmaaroche
Copy link
Contributor Author

Thanks @averevki, no 'official' data, but I noticed this refactor with overview tests and policy tests it takes roughly 7 mins to run whereas that was how long just policy tests alone were taking

Signed-off-by: emmaaroche <eroche@redhat.com>
Copy link
Member

@azgabur azgabur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@emmaaroche emmaaroche merged commit 1396503 into Kuadrant:main Feb 12, 2026
4 checks passed
@emmaaroche emmaaroche deleted the update-ui-login-flow branch February 12, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactor with same functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize UI test authentication to avoid repeated login

3 participants