Integration tests
On the frontend, we will utilize Jest to perform integration tests. We will mock out the backend endpoints, assuming that our backend is tested sufficiently, to confirm that the UI as a whole will work as expected.
Many of these tasks require that the word is spoken aloud, but audio cannot be easily tested automatically, so we leave that to acceptance testing.
Use Case 1: Drawing Recognition - Drawing is Recognized
- Simulate a drawing of a t-shirt on the canvas
- Submit drawing to a mocked endpoint that returns 5 guesses
- Ensure that Tiles for each of the 5 guesses is visible on the screen and can be tapped
Use Case 2: Image Drawing - Edit Drawing
- Simulate a drawing of a t-shirt on the canvas
- Click clear canvas and ensure it is cleared
- Simulate a drawing of pants on the canvas
- Submit drawing to a mocked endpoint that returns 5 guesses
- Ensure that Tiles for each of the 5 guesses is visible on the screen and can be tapped
Use Case 3: AAC Board - Add Custom Tiles
- Enter the login details for a fake account and have the mocked login endpoint return successful
- Navigate to the tile board on the main screen
- Press the create custom tile button
- Simulate a drawing on the canvas
- Simulate a voice recording
- Press save and confirm the correct data is sent to the backend
- Navigate to the tile board on the main screen
- Press the create custom tile button
- Submit a picture
- Simulate a voice recording
- Press save and confirm the correct data is sent to the backend
Use Case 4: AAC Board - Use Tile Board
- Click the manual button to open the AAC board
- Tap a word category
- Tap a word in that category
Use Case 5: Image Recognition & Drawing - Draw Rather Than Using Tiles
- Click the manual button to open the AAC board
- Tap a word category
- Return to home page
- Simulate a drawing of a t-shirt on the canvas
- Submit drawing to a mocked endpoint that returns 5 guesses
- Ensure that Tiles for each of the 5 guesses is visible on the screen and can be tapped
Use Case 6: Download App
Refer to acceptance testing.
Use Case 7: Account Creation
- Tap to create an account
- Enter details for a fake account and the mocked endpoint login returns successful
- Ensure that user is logged into fake account
Use Case 8: AAC Board - View Custom Tiles
- Enter the login details for a fake account and have the mocked login endpoint return successful
- Click the manual button to open the AAC board
- Have the backend endpoint return a fake custom tile
- Ensure that the custom tile can be tapped on the tile board
Use Case 9: PWA - Connection Lost
- Simulate a drawing of a t-shirt on the canvas
- Submit drawing to a mocked endpoint that returns an error simulating network loss
- Ensure that the user is alerted that there is no internet Without calling any endpoint ensure the user can:
- Click the manual button to open the AAC board
- Tap a word category
- Tap a word in that category
Use Case 10: Camera Recognition
- Simulate a picture taken with an existing image
- Submit picture to a mocked endpoint that returns 5 guesses
- Ensure that Tiles for each of the 5 guesses is visible on the screen and can be tapped