Skip to content

OLD - fixes for app e2e #2194

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

OLD - fixes for app e2e #2194

wants to merge 10 commits into from

Conversation

vyncent-t
Copy link
Collaborator

No description provided.

@vyncent-t
Copy link
Collaborator Author

This issue seems to be related to the WSL render issue as this error only occurs on machines that are impacted by that issue.

Machines impacted by the render error:

  • run 'npm run start'
  • look for the error messages: "MESA: error: ZINK: failed to choose pdev" "glx: failed to create drisw screen"

image

For machines impacted when running the 'npx playwright test -g "launch app" the app will not launch and will return the error codes "MESA: error: ZINK: failed to choose pdev" "glx: failed to create drisw screen"

For machines NOT impacted:

  • when running the 'npx playwright test -g "launch app" a different error occurs but it seems that playwright for electron works fine
    image

@vyncent-t
Copy link
Collaborator Author

  • disableGPU seems to get the app to launch but the error codes still occur in playwright
  • also the backend error
    image

image

@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch 2 times, most recently from 85d7920 to 064ac2f Compare July 31, 2024 19:28
@vyncent-t
Copy link
Collaborator Author

vyncent-t commented Jul 31, 2024

Last push works with creating an env for playwright to launch the app in

the env must contain a few specific things before starting

Instructions

Readying the playwright env

  • Get the env ready for playwright to launch electron by running the commands for frontend
  • In a terminal cd into headlamp and run make run-frontend

current working directory

  • change the 'cwd' to match the electron path for your machine
    image

use the localhost

  • change the url to be the localhost
    image

Launch playwright UI

  • cd into app/app-e2e-tests and run npx playwright test --ui

@skoeva
Copy link
Collaborator

skoeva commented Jul 31, 2024

My recent push allows for running the frontend and backend servers (otherwise using make run-frontend or make run-backend) within the test suite.

Testing instructions

Change the current working directory

  • Change the cwd to match the paths for your local machine (replace skoeva with your username)

image

Launch the test suite and run the test

  • Run cd app/app-e2e-tests/e2e && npx playwright test --ui
  • Run the 'launch app with integrated shell commands' test

image

@vyncent-t
Copy link
Collaborator Author

Was working on a side commit for pages, it is not compatible at the moment, that sideline was abandoned- will continue with this

@vyncent-t
Copy link
Collaborator Author

working on solution to be able to run all tests at once and not one after another, currently errors when trying to run whole group

@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from bd2077e to 48d298f Compare August 7, 2024 14:53
@vyncent-t vyncent-t self-assigned this Aug 7, 2024
@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from 0ed628b to e347a3a Compare August 7, 2024 19:04
@vyncent-t
Copy link
Collaborator Author

vyncent-t commented Aug 8, 2024

Issue: when trying to merge all the e2e tests in one place

  • The playwright config issues between the app mode and the base project prevent us from using the HeadlampPage methods when either importing and working with the main structure of it (cant import it from the base project and run methods in the app mode)

  • Because of this, there are also differences in the playwright config when it comes to working on running tests, currently the app mode MUST be ran one test at a time in order for it to not clash with the electron app launch and close. The base project tests do NOT need to be ran with the same configuration thus proving difficult to merge them.

@vyncent-t
Copy link
Collaborator Author

Issue: Trying to work and connect to in cluster app mode

  • Current there seems to be an issue where the app is running twice when using the headlamp addon
    image

This issue does NOT occur when running tests with the headlamp addon disabled

@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from f157497 to 292e456 Compare August 27, 2024 14:40
@vyncent-t
Copy link
Collaborator Author

working on fixing headlamp addon clash

@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from 292e456 to 3a8ae4f Compare August 27, 2024 16:25
@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from 3a8ae4f to be31ab3 Compare September 5, 2024 20:06
@vyncent-t
Copy link
Collaborator Author

Currently the app mode does connect and we are able to create and delete resources as normal, the only issue now is that when running create or delete tests

  • test fails to find delete box and continues to wait
  • test fails to find the pop up that reads "XYZ has been deleted"
  • test fails to close after delete process finishes (need to add a new way to find if something deletes)

@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from be31ab3 to b82ae4b Compare September 11, 2024 19:44
vyncent-t and others added 8 commits September 13, 2024 13:53
Signed-off-by: Vincent T <[email protected]>
Signed-off-by: Evangelos Skopelitis <[email protected]>
Signed-off-by: Evangelos Skopelitis <[email protected]>
Fixed tests failing when ran together, now run in sequence.

Signed-off-by: Vincent T <[email protected]>
@vyncent-t
Copy link
Collaborator Author

vyncent-t commented Sep 13, 2024

I am trying to use scripts that will change the env for when we run the tests in different modes.

WIP: moving the app namespace tests to what we currently use

to do: create a test for namespace create button icon

  • the playwright test command runs another test so no longer using "playwright-test-web": "cross-env PLAYWRIGHT_TEST_MODE=web npx playwright test -g 'create a namespace with the minimal editor then delete it' --workers=1",
  • trying to use test.before to work with the pages does not seem to work (it would pause at the main page)
  • working on starting every test from the same point (the main page)
  • starting point will also be different when running the script for each playwright mode

NOTE:

  • need minikube running for the main page to function await this.page.getByRole('link', { name: 'minikube' }).click();
  • we have changed a few things for the playwright fig 9will need to reset to normal later or also have them use env)

@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from b82ae4b to a363bbe Compare September 16, 2024 15:51
@vyncent-t vyncent-t force-pushed the electron-e2e-test-demo branch from 3ddf16c to 6abff11 Compare September 17, 2024 15:27
@illume illume mentioned this pull request Oct 15, 2024
@vyncent-t vyncent-t changed the title WIP: fixes for app e2e OLD - fixes for app e2e Nov 20, 2024
@k8s-triage-robot
Copy link

Unknown CLA label state. Rechecking for CLA labels.

Send feedback to sig-contributor-experience at kubernetes/community.

/check-cla
/easycla

@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2025
Copy link

CLA Not Signed

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants