jsdelivr / globalping-dash-directus

Open Software License 3.0
0 stars 0 forks source link

Add e2e tests #27

Open MartinKolarik opened 3 hours ago

MartinKolarik commented 3 hours ago

Either fully automated like with GP API, or a test suite that targets the configured directus URL (that I launch myself).

alexey-yarmosh commented 2 hours ago

I think it should test combination of globalping-dash-directus and globalping-dash, by clicking the UI using e.g. Playwright. Pretty similar to the GP api + GP probe. Tests then may be executed in both dash repos.

MartinKolarik commented 2 hours ago

That's an option as well, but UI tests are generally much slower to run and more fragile, I'd be fine with just testing the Directus API too.

alexey-yarmosh commented 2 hours ago

Agree about slowness and fragility, but just integration tests for the Directus API don't add a lot on top of existing unit tests. Last time the dash was broken because of change of the url in directus and not in dash UI. So I'd rather start with full 2 repo setup here.

MartinKolarik commented 2 hours ago

It was broken once because of missing extensions, which these tests would catch, and then because of URL change, which they would catch as well (yes, it's possible we'd still forget to update dash, but if you had to change an e2e test in the PR here, it would be much more obvious the dash needs an update too). I'm fine with both options though.