ruxailab / RUXAILAB

RUXAILAB - Usability Testing and Heuristics Evaluation Conceptual learning
MIT License
41 stars 62 forks source link

Playwright testing #478

Closed Zlatanius closed 3 months ago

Zlatanius commented 4 months ago

This PR adds adds playwright UI tests, as well as a github action that runs them. This is part of the quality controll subject of which Marc is the professor. Attention should be payed to the change in the Jest configuration. As it stands right now any test contained in a folder called e2e (at any depth) will be ignored by Jest. This change was required because the last configuration was matching any files ending in .spec.js and tried to run playwright tests as unit test and therefore the test GH action would always fail.

sergiobeltranguerrero commented 4 months ago

You are using the production url to test the branch. You should use localhost:port Shottr 2024-06-02 10 39 11

Zlatanius commented 4 months ago

@sergiobeltranguerrero @marcgc21 requested that the production is tested. I can look into testing development as well sometime later.

sergiobeltranguerrero commented 4 months ago

Hi @Zlatanius I'm checking the branch and I'm finding bugs that need to be fixed, at the moment you can't run the tests on a production branch.

I have also seen that in the tests you log in, but I don't see you register the user previously..... Shottr 2024-06-02 14 28 20

When I have it sorted out we will approve it and look at doing more tests.

Zlatanius commented 4 months ago

Hi @sergiobeltranguerrero, can you explain what do you mean by I can't run tests on the production branch. The branch isn't ready to be tested or do the tests not work?

As for the user, the user used in tests is registered on the system manually.

Zlatanius commented 4 months ago

I've added plywright projects that tun tests on the https://ruxailab-dev.web.app/ URL. However there seems to be enough differences that some tests fail on the dev URL. Also I've added video recording to failed tests.

sergiobeltranguerrero commented 4 months ago

What I mean is that you are running tests using a URL (https://ruxailab-dev.web.app/) that does not reflect the changes from the current branch. For example, if you now include a change in a functionality, the GitHub pipeline will fail because that change does not exist in the URL you are using...

Zlatanius commented 4 months ago

Ok that makes sense, but production is ok right? My main task is to test the production.

sergiobeltranguerrero commented 4 months ago

Yes, the tests are fine. But I can't approve it until I fix the url.

github-actions[bot] commented 3 months ago

⚠️ The tests have failed, @sergiobeltranguerrero Please review the proposed changes.

sonarcloud[bot] commented 3 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
8 Security Hotspots

See analysis details on SonarCloud