-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cannot run my test without affecting all other tests #15349
Comments
One approach which circumvents the problem would be having the custom CSS always on and then defining the custom CSS as: body[data-testing-custom-css] .jp-Cell {
background: red
} and then in your integration test set the |
(for reference the configuration is implemented in) jupyterlab/jupyterlab/galata/__init__.py Lines 10 to 40 in 453adc4
|
Also, if you want to test server startup of the server with different options you can add a jupyterlab/packages/testing/src/start_jupyter_server.ts Lines 18 to 49 in c106f0a
Does the above help @RRosio? |
Adding a question here. As far as I know, these are the pieces of Lab's testing infrastructure:
Are there any other pieces? Thanks :D |
Thank you @krassowski this has all been very helpful! I have been trying out the suggestion you made with the data attribute on the CSS, as it seems more approachable to me. I am currently setting the If I understand, I can use the jest test to check that the Server starts up with my additional flag? I am inclined to think that the test should check that the handlers have been appended by making a request to that endpoint, is that the sort of test you are referring to? Also, once I have checked that, would it be a test that I should include in my PR? |
Every core package includes a There is also pytest used on the backend. I would not split galata and playwright into separate subpoints; there is no python wrapper around playwright at least nothing that I would call that; galata is just a set of helpers for playwright which is a pretty typical use case of playwright I think. Briefly (this possibly should be turned into a PR once I or someone else have more time):
|
By the way, a way to familiarise yourself with the codebase which worked very well for me was gradually helping with pull request review, especially these tagged as Needs Review ;) |
Yes.
Basically yes, this was my thinking; more specifically whether the handler is available and whether server returns the css file depending on the flag setting (as you described). Perhaps it better belongs on the pytest level though? |
I have one more question about the Galata tests. I am trying to run the tests locally to first generate the image that my test will later use for comparison, but I am running into either 403 or 404 errors. The recordings show the Jupyterlab application in the browser and a Launcher Tab opened. Below are some of the errors. Maybe it is something in either my environment that is not correct or the steps that I am taking to run the tests.
The steps I take to set up the tests |
The 404 errors are unrelated and are not really errors. I believe this is problem with jupyter-server and tracked in:
The other issue is looks similar to what I am trying to fix in #15355. Can you try to apply the changes to activity.ts from that PR locally, run |
My test needs additional JupyterServer flags (
--LabApp.custom_css=True
), and I don't know how to add them without affecting the server configuration for all the other tests.I would like to make a write up of this process so that others using Galata can refer to it later on. Thank you!
The text was updated successfully, but these errors were encountered: