AceCentre / pasco

Phrase Auditory Scanning COmmunicator - AAC App for iOS and the Web
https://app.pasco.chat
GNU General Public License v3.0
14 stars 6 forks source link

Improve automated test coverage #227

Closed willwade closed 1 year ago

willwade commented 4 years ago

Thinking ahead here.. But once we have the webpack PR finished I think we were suggesting that tests should be setup. Do we have any ideas how these would be done?

@hosseinamin @gavinhenderson

gavinhenderson commented 4 years ago

Hey @willwade there is actually already some tests in the webpack PR. The tests are stored in .spec.js files if you want to have a look

willwade commented 4 years ago

thanks @gavinhenderson I know when we've been building in significant new features its when we miss big gaping holes. Like we moved to flexbox and didn't properly test the switch functionality. - and then found the speech bug where it stopped speaking on WebKit. (you fixed that one!). Guess with more tests about basic functions some of these will get picked up. I'm guessing we can do platform specific tests too - like for iOS ?

gavinhenderson commented 4 years ago

Hmm thats an interesting question @willwade .

The tests that I have been writing have been mostly unit tests using testing-library so they aren't specific to any browser in particular. You're right in that we should be able to catch breakages with the unit tests but unit tests aren't perfect.

I don't have any experience in writing end-to-end tests that run in a simulator. Cypress is usually my go to tool for end-to-end tests but I don't think it makes sense here as it would only test in chrome.

Although I can't imagine we are the first people to want to have automated tests for a cordova app that run in a simulator so we can probably do some research and see how other people get it done. From my brief google seems like appium is the common solution.

What might be cool (although not sure how feasible given resourcing) is that we could have some of these e2e tests setup in the current project so we can run them against the migrated webpack version to confirm we have all the critical features working