Open jessfraz opened 2 months ago
Howdy @jessfraz , sorry for the late reply:
setupElectron
and let it load the app, once an element on page appears .e.g Create New project button, stop the timer and compare against some threshold value. If the time taken is more than the threshold value, fail the test
(b) add a secret hidden element on the page which tracks the app load time, we can then use playwright to query the value of this element and compare against some threshold value.2 and 3. Unfortunately, this is going well beyond Playwrights' capabilities since it can really only deal with the browser. Perhaps another tool can be utilized? I doubt that it would be open source so we'd probably need to engage with some tool vendor and then have all of it integrated into GH workflow somehow
Do we only want to do this for failing tests and can we control which folder the dump goes into? If so, we can have Playwright examine the contents of the folder/files, delete it upon completion
hmm, tricky. We'd need to install initial packaged version of the app first and then run the updater on top if it. I guess we'd need to do this for all support OS and we need to take into considering which version the user is updating from
I've used cross-env in my past life:
smth like this?
"electron:package": "cross-env SOME_VAR=SOME_VALUE electron-forge package",
"electron:package:dev": "cross-env SOME_VAR=SOME_OTHER_VALUE electron-forge package",
And enable dotenv
within the playwright config file
https://github.com/KittyCAD/modeling-app/commit/b4e0bd038e95b25ac32c4bfb23ac4b00c870ad23 copies dev env vars into .env.production there must be a better way to get yarn electron:package to either build or run in dev mode so that it uses the dev env vars.
Why not NODE_ENV=production to load the .env.production
I think you covered everything - yeah these all seem like hella hard to test outside of playwright :D.
oh number 6 is irrelevant i removed that
so right now its working fine without it!
also for coredump i just mean when you hit the file a bug button it works and opens up github thats all, nothing too fancy but idk how to test for external windows and shit
also for coredump i just mean when you hit the file a bug button it works and opens up github thats all, nothing too fancy but idk how to test for external windows and shit
no worries, I think Kurt had a similar issue with one of his tests, I will have a poke around and see what is doable
Hi @ryanrosello-og, I saw s post from @jessfraz online and wanted to chime in here:
- how can we test double clicking a file in the os finder and it opening in the app (and performance test speed to open here as well)
- how can we test opening a file via double click where we have to accept a native os dialog for perms (we def want to test this code path)
I could offer help with nut.js to tackle this?
Some questions for @ryanrosello-og when he’s back and after initial electron merge also cc @lf94 for anything I’m missing
̶.̶e̶n̶v̶.̶p̶r̶o̶d̶u̶c̶t̶i̶o̶n̶
̶ ̶t̶h̶e̶r̶e̶ ̶m̶u̶s̶t̶ ̶b̶e̶ ̶a̶ ̶b̶e̶t̶t̶e̶r̶ ̶w̶a̶y̶ ̶t̶o̶ ̶g̶e̶t̶ ̶̶y̶a̶r̶n̶ ̶e̶l̶e̶c̶t̶r̶o̶n̶:̶p̶a̶c̶k̶a̶g̶e̶
̶ ̶t̶o̶ ̶e̶i̶t̶h̶e̶r̶ ̶b̶u̶i̶l̶d̶ ̶o̶r̶ ̶r̶u̶n̶ ̶i̶n̶ ̶d̶e̶v̶ ̶m̶o̶d̶e̶ ̶s̶o̶ ̶t̶h̶a̶t̶ ̶i̶t̶ ̶u̶s̶e̶s̶ ̶t̶h̶e̶ ̶d̶e̶v̶ ̶e̶n̶v̶ ̶v̶a̶r̶s̶.̶Also in relation to #1 in the list we don’t even have metrics on perf today but we will want them so we can make it faster