eclipse-thingweb / playground

Browser or Node.js based tool for validating and playing with W3C Thing Descriptions
https://playground.thingweb.io/
Other
28 stars 22 forks source link

Add playwright testing for the new web package #513

Closed SergioCasCeb closed 9 months ago

SergioCasCeb commented 10 months ago

The implemented testing for the new web packages, tests only the visual aspects of the application rather than the functionality of each package. More tests will be added for the remaining console views such as OpenAPI, AsyncAPI, AAS AID, Defaults, and the visualization view.

netlify[bot] commented 10 months ago

Deploy Preview for thingweb-playground ready!

Name Link
Latest commit d190b93a5135b931d3dcd51a8b3d17d4a79296b2
Latest deploy log https://app.netlify.com/sites/thingweb-playground/deploys/655364c7d41d7e0008e65fa1
Deploy Preview https://deploy-preview-513--thingweb-playground.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

SergioCasCeb commented 10 months ago

All remaining tests have been added as well as the respective description in the README file. Fixes #513

egekorkan commented 10 months ago

The tests are working except for one but they should not be run for all the browsers all the time and in developer machines. For example, my setup with Manjaro Linux is not supported by Playwright to install msedge. We should simply split a run with "all browsers" to another script that is run only in GitHub actions

Failing test: Open the tree visualization view with the thing template and modified the input values

egekorkan commented 9 months ago

@SergioCasCeb there is another test failing now where the popup events are not found so all tests for settings pop up links (check Thingweb footer link etc.) are failing. I am not sure but is that side bar opening firing a popup event by default? It seems not the case but if I add window.dispatchEvent(new CustomEvent("popup")); at https://github.com/eclipse-thingweb/playground/blob/master/packages/web-new/src/scripts/settings-menu.js#L60, those failing tests pass. What do you think @SergioCasCeb ?

egekorkan commented 9 months ago

@SergioCasCeb I have added that line of code but feel free to suggest another solution. I have also synced this branch with master.

egekorkan commented 9 months ago

The failure seems to be a time issue and not about the event I have mentioned above. The PR is ready to merge. The tests failing in GitHub actions is due to missing tests in web-new but these are coming with #515