-
Notifications
You must be signed in to change notification settings - Fork 13
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
Test user workflow in dashboard #581
Conversation
Hi @cpranav93 @laurasootes Would either of you be willing to review this PR? Don't mind the sonarcloud test failing, I changed 3 lines in |
Hmm if I try to run I have 2 questions:
|
Which OS are you running this on? I only tested it under linux. I can have a look whether it works on Windows. My idea was that you can set
|
I guess these tests do not necessarily work 'out-of-the-box'. They need some fairly substantial setup, before you can use them (i.e. install the browser). Do you think we should disable them by default, and just let github actions run them? |
I am using Mac M1, and was not able to install chromium within a few minutes 😒. I think it would indeed be better to only include the test in the GitHub actions. I agree with your reasoning on only testing on ubuntu, but would suggest to also include webkit and firefox for the browsers, just to be sure. |
4863af9
to
6154377
Compare
Can you try again after installing chromium in playwright?
Tests should now be disabled by default, so they only run in the CI or when you use:
Tbh, I don't think testing in firefox/webkit adds anything. The goal of this test is to test the user workflow by checking whether any explanations appear at all to avoid changes in dianna breaking the dashboard. This won't make a difference between firefox, safari or chrome in my view. |
Thanks for pointing that out, it's surprisingly tricky to set this up. I added a flag to tell pytest to also run the dashboard tests:
If this flag is not specified, it will mark tests to skip if they have the dashboard mark. I hope this works now. EDIT: still broken |
Yes it works now 🥳 Sounds good to only do chromium btw Should this flag option maybe be added to the dev documentation? |
Cheers, I will add a small section to the documentation. |
This PR adds a test module that tests the user workflow in the dashboard using playwright.
These tests make sure that the dashboard runs given the example data. It makes sure that the workflow completes (i.e. the RISE method produces an explanation) by checking whether the image or text is there.
These tests are somewhat time consuming, so I run them in a separate github action on python3.10/ubuntu.
Closes #567
Todo