AAO-React-Native
AAO-React-Native copied to clipboard
đź§Ş Add end-to-end tests for navigation
I like testing.
Testing is good.
"We should test more stuff" has been a long-standing thing I've said, but here I'm actually trying my hand at e2e testing.
I'm Not Sure™ if this affects coverage at all. It'd be nice if it did, but I don't think Detox instruments that yet, or if they do, I don't think we're uploading that. So, I guess I just have to give this a try.
Courtesy of @drewvolz, I'm adding a to-do list of things I should look at:
Home
- [ ] List of buttons
Menus
- [ ] Stav Hall
- [ ] Cage
- [ ] Pause
- [ ] Burton
- [ ] LDC
- [ ] Weitz
- [ ] Sayles
- [ ] Menu Item Detail
SIS
- [ ] Balances
- [ ] Course Search Home
- [ ] Course Search List
- [ ] Course Search Detail
- [ ] TES
- [ ] Open Jobs List
- [ ] Open Jobs Detail
Building hours
- [ ] Hours List
- [ ] Hours Detail
- [ ] Hours Problem Report
- [ ] Hours Schedule Editor
Calendar
- [ ] St. Olaf Calendar
- [ ] Oleville Calendar
- [ ] Northfield Calendar
- [ ] Calendar Event Detail
Directory
- [ ] Link to browser (current implementation)
- [ ] Directory List (awaiting PR merge)
- [ ] Directory Contact Detail (awaiting PR merge)
Streaming Media
- [ ] Events calendar
- [ ] Webcams
- [x] KSTO Radio
- [ ] KRLX Radio
- [ ] Radio Schedule
News
- [ ] St. Olaf List
- [ ] Oleville List
- [ ] Mess List
- [ ] PoliticOle List
- [ ] KSTO List
Map
- [ ] Link to Browser
Important Contacts
- [ ] Contacts List
- [ ] Contacts Detail
Transit
- [ ] Express Bus
- [ ] Red Line
- [ ] Blue Line
- [ ] Oles Go
- [ ] Other Modes
- [ ] Other Modes Detail
Dictionary
- [ ] Dictionary List
- [ ] Dictionary Detail
- [ ] Dictionary Editor
Student Orgs
- [ ] Orgs List
- [ ] Orgs Detail
Moodle
- [ ] Link to Browser
Report a Problem
- [ ] List of help cards
stoPrint
- [ ] Printer List
- [ ] Print Job Release
Safety Concerns
- [ ] Link to Browser
Settings
- [ ] Login
- [ ] Contact Us
- [ ] FAQs
- [ ] Reset
- [ ] Icon Settings
- [ ] Credits
- [ ] Privacy Policy
- [ ] Legal
- [ ] Contributing (link to browser)
Smaller Fish
Developer
- [ ] API Test
- [ ] BonApp Picker
- [ ] Redux Debug
- [ ] Sentry Message
- [ ] Sentry Exception
Integrated but not visible
- [ ] Bus Map
Codecov Report
Merging #4013 (f64c56d) into master (c2358b2) will not change coverage. The diff coverage is
0.00%.
Additional details and impacted files
@@ Coverage Diff @@
## master #4013 +/- ##
======================================
Coverage 8.59% 8.59%
======================================
Files 298 298
Lines 5097 5097
Branches 1383 1383
======================================
Hits 438 438
Misses 4636 4636
Partials 23 23
I think we should tweak the Detox tests to not reinstall the app before every test. I don’t remember why I did that originally.
Anyway, ideas:
-
Calendar, tap first item in the list of there are any items
-
Building Hours, same thing
-
Settings, assert that the Sign In button is visible?
I have taken care of the relaunching behavior in 6dd0d1f49456d4a8272beca47a224e9b3f8fdd43.
So I can't find my testID because "React Native only supports the testID prop on the native built-in components."
It sounds like I have to manually propagate that through to the appropriate element.
Hey, a passing build!
List of views I think we could add E2E tests to. Feel free to edit.
Home
- [ ] List of buttons
Menus
- [ ] Stav Hall
- [ ] Cage
- [ ] Pause
- [ ] Burton
- [ ] LDC
- [ ] Weitz
- [ ] Sayles
- [ ] Menu Item Detail
SIS
- [ ] Balances
- [ ] Course Search Home
- [ ] Course Search List
- [ ] Course Search Detail
- [ ] TES
- [ ] Open Jobs List
- [ ] Open Jobs Detail
Building hours
- [ ] Hours List
- [ ] Hours Detail
- [ ] Hours Problem Report
- [ ] Hours Schedule Editor
Calendar
- [ ] St. Olaf Calendar
- [ ] Oleville Calendar
- [ ] Northfield Calendar
- [ ] Calendar Event Detail
Directory
- [ ] Link to browser (current implementation)
- [ ] Directory List (awaiting PR merge)
- [ ] Directory Contact Detail (awaiting PR merge)
Streaming Media
- [ ] Events calendar
- [ ] Webcams
- [ ] KSTO Radio
- [ ] KRLX Radio
- [ ] Radio Schedule
News
- [ ] St. Olaf List
- [ ] Oleville List
- [ ] Mess List
- [ ] PoliticOle List
- [ ] KSTO List
Map
- [ ] Link to Browser
Important Contacts
- [ ] Contacts List
- [ ] Contacts Detail
Transit
- [ ] Express Bus
- [ ] Red Line
- [ ] Blue Line
- [ ] Oles Go
- [ ] Other Modes
- [ ] Other Modes Detail
Dictionary
- [ ] Dictionary List
- [ ] Dictionary Detail
- [ ] Dictionary Editor
Student Orgs
- [ ] Orgs List
- [ ] Orgs Detail
Moodle
- [ ] Link to Browser
Report a Problem
- [ ] List of help cards
stoPrint
- [ ] Printer List
- [ ] Print Job Release
Safety Concerns
- [ ] Link to Browser
Settings
- [ ] Login
- [ ] Contact Us
- [ ] FAQs
- [ ] Reset
- [ ] Icon Settings
- [ ] Credits
- [ ] Privacy Policy
- [ ] Legal
- [ ] Contributing (link to browser)
Smaller Fish
Developer
- [ ] API Test
- [ ] BonApp Picker
- [ ] Redux Debug
- [ ] Sentry Message
- [ ] Sentry Exception
Integrated but not visible
- [ ] Bus Map
I realize these have been sitting in this PR but probably can be merged in as they are written. Is there anything besides resolving conflicts that we need to do to get these in?
Riffing from @drewvolz's comment, I think that once we get Detox working again this should be only a small amount of work to merge!
● Streaming Media View › has the Stream List visible by default
Test Failed: No elements found for “MATCHER(id == “homescreen-button-StreamingView”)”
HINT: To print view hierarchy on failed actions/matches, use log-level verbose or higher.
30 | it('has the Stream List visible by default', async () => {
31 | // Navigate into StreamingView
> 32 | await element(by.id('homescreen-button-StreamingView')).tap()
| ^
33 |
34 | // The stream-list should be visible now
35 | await expect(element(by.id('stream-list'))).toBeVisible()
at Object.<anonymous> (e2e/streaming.spec.ts:32:59)
Working on this part next…
ready!
I fully agree! And I agree about that being a separate effort - we'll get a lot of value just from having the assurance that every view is reachable by navigating the app, I think!