-
Notifications
You must be signed in to change notification settings - Fork 160
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
Initial Playwright E2E Test for App Mode in Electron #2344
base: main
Are you sure you want to change the base?
Conversation
6c8b0dd
to
4717294
Compare
4717294
to
bdccfe8
Compare
last push fixes failing tests for web / app / incluster and are all now working for namespace playwright test note: remove headless use |
bdccfe8
to
bc9e00f
Compare
NOTE: trying to see if rebasing to the current main fixes the build failure, also removing 'incluster' just to try letting the CI work |
9542194
to
89ba8af
Compare
Suggestion for how to proceed.
|
8f4cc21
to
d684e6a
Compare
last push adds the working app playwright test for namespaces Note: The testing for app mode coverage must be done locally at this point as it is too unstable to add to into the CI builder. This test is meant to be the foundation for later app coverage test. The test will require some pre set up steps before running
|
I will be creating a different PR later for enabling of faster and easier testing using scripts |
Signed-off-by: Vincent T <[email protected]>
1eb401b
to
0871dd5
Compare
|
Add working scripts Signed-off-by: Vincent T <[email protected]>
0871dd5
to
683dae4
Compare
removed a dialog line that was spelled wrong |
Description
This PR introduces a functional Playwright end-to-end (E2E) test for the
app mode
of the Headlamp project usingElectron
. In previous attempts, we tried leveraging the current E2E test configuration used in live production; however, this setup proved incompatible with theapp mode
.As a result, we are focusing on developing and stabilizing
app mode
tests locally. For now,test execution will remain local-only
, ensuring smoother development until we revisit integration with other environments.This PR also introduces scripts that simplify running tests in both
app mode
andweb mode
. These scripts will help streamline the testing process and ensure a more consistent workflow across different environments.A future PR will introduce further automation to improve the ease of switching between
local app mode
andlocal web mode
. Earlier attempts to combineapp mode
with in-cluster configurations were unstable, so these modes will remain separate for now.Steps to Use This Test
Prerequisites
Minikube
is installed and running with an instance named 'minikube'.cd headlamp/app/e2e-tests
Manual Testing
Set the environment variable to
app
before running tests:export PLAYWRIGHT_TEST_MODE='app'
To test in
web mode
, switch the environment variable:export PLAYWRIGHT_TEST_MODE='web'
Automated Script Testing
These scripts simplify running the Playwright tests for both
app mode
andweb mode
. Note that switching between modes will likely cause the backend to disconnect, and you’ll need to restart the backend if switching fromapp
toweb mode
during testing.Available Scripts
test-app
: Runs the tests inapp mode
.PLAYWRIGHT_TEST_MODE=app playwright test
test-web
: Runs the tests inweb mode
.PLAYWRIGHT_TEST_MODE=web playwright test
Flags:
Add the following flags at the end of each script command to use
ui
: run flag--ui
to launch in ui modeheaded
: run flag--headed
to view the test