Skip to content

Commit 06b499c

Browse files
committed
pulled in courseHome branch
2 parents 7c0e794 + e06d410 commit 06b499c

File tree

17 files changed

+1043
-169
lines changed

17 files changed

+1043
-169
lines changed

docs/defect_reporting.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Defect Reporting
22

3-
Please use this google form link to report any defect you find in the prototype.
3+
## Internel Tester - Submit JIRA issue ticket
44

5-
https://forms.gle/aTeX2EaxwV6vFZPq9
5+
If you have access to the JIRA system, please use the link to file a issue ticket in our webrew JIRA board.
6+
7+
[webrew board](http://platinum.cscaws.com:8080/secure/RapidBoard.jspa?rapidView=52&view=planning&selectedIssue=WEB-187&issueLimit=100)
8+
9+
## External Testers - Use Google Form
10+
11+
For those whose who don't access to JIRA, please use this google form link to report any defect you find in the prototype.
12+
13+
[Flipt(ed)-webrew Defect Report](https://forms.gle/aTeX2EaxwV6vFZPq9)
14+
15+
## Contact
16+
17+
If you have trouble accessing webrew app, please reach out to our team contact point @zhongyuan on slack at [here](https://secapstone2021.slack.com/archives/D01J7HYCZRA). Thanks.

docs/testing.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
How to write a UI unit test
2+
---
3+
1. See `src/tests/course.test.tsx` and my changes to `src/course/create-course-dialog.tsx`
4+
- We'll organize these the same way we'll organize interfaces: by scene/page/feature/namespace
5+
2. Add to an existing test file if testing the same namespace, or create a new test file. Import react and all that other stuff
6+
3. Import react-testing-library functions from `src/tests/test-utils.tsx`
7+
- This is our wrapper library that includes a custom render function to mock Apollo requests.
8+
4. Add a test(). Here are some handy functions:
9+
- `render()`: Render your component
10+
- `fireEvent`: This is the mocked user. Use it to mock `.click()` events, for example.
11+
- `screen.getBy...()`: This is called a query, used to grab UI components. Think of them like querySelectors.
12+
- The ones we'll use the most is probably `getByTestId` or `getByLabelText`
13+
- `expect()`: Basically our assert
14+
- RTL Docs for more: [react-testing-library](https://testing-library.com/docs/react-testing-library/cheatsheet)
15+
- List of expect() chains: [jest-dom](https://github.com/testing-library/jest-dom#table-of-contents)
16+
5. Add necessary `data-testid`'s to components that you want to be grabbable by the tests.
17+
6. Run `npm test`

0 commit comments

Comments
 (0)