Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test to ensure data loads on teacher dashboard #327

Open
2 tasks
GuillermoFloresV opened this issue Jun 4, 2023 · 1 comment
Open
2 tasks

Add test to ensure data loads on teacher dashboard #327

GuillermoFloresV opened this issue Jun 4, 2023 · 1 comment

Comments

@GuillermoFloresV
Copy link
Member

Currently, no tests exist to ensure that a teacher's dashboard will load with data/how to handle a lack of data.

These tests should take into consideration these scenarios:

  • Data is fetched correctly and displayed on the dashboard
  • Data cannot be fetched and the dashboard renders an error instead

You can use our already existing mock server (Step 8 in the 'Get the code' section of the readme) to simulate data fetching. Please note that this server must be running locally alongside the app to be able to access the data inside of it.

We can make use of Jest asynchronous testing.

The data that currently lives inside the mock server is not the exact format the dashboard requires.

Because of this, we can mock the entire dashboard rather than just the component that the dashboard uses to ensure that our data is properly set up for the test. Or take on issue # before this one, and have that code run before these tests.

@ShubhamPatilsd
Copy link

CodeDay Labs Students will be working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants