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

Write tests for all components and pages #17

Open
blms opened this issue Jul 15, 2020 · 2 comments
Open

Write tests for all components and pages #17

blms opened this issue Jul 15, 2020 · 2 comments
Labels
testing Related to tests, Jest, mocks, etc

Comments

@blms
Copy link
Member

blms commented Jul 15, 2020

Write unit tests for a variety of API requests and results

blms added a commit that referenced this issue Jul 27, 2020
blms added a commit that referenced this issue Jul 27, 2020
blms added a commit that referenced this issue Jul 27, 2020
blms added a commit that referenced this issue Jul 27, 2020
blms added a commit that referenced this issue Jul 28, 2020
blms added a commit that referenced this issue Jul 28, 2020
@blms blms added the testing Related to tests, Jest, mocks, etc label Jul 30, 2020
@blms
Copy link
Member Author

blms commented Aug 3, 2020

Still need to write tests for successful POST to /api/document.

Also need to write tests for all the other API routes!

blms added a commit that referenced this issue Sep 1, 2020
blms added a commit that referenced this issue Sep 1, 2020
blms added a commit that referenced this issue Sep 1, 2020
@blms blms changed the title Write tests for API Write tests for all components and pages Nov 18, 2020
blms added a commit that referenced this issue Nov 18, 2020
blms added a commit that referenced this issue Nov 18, 2020
blms added a commit that referenced this issue Nov 18, 2020
blms added a commit that referenced this issue Nov 19, 2020
blms added a commit that referenced this issue Nov 19, 2020
@blms
Copy link
Member Author

blms commented Nov 19, 2020

Pages:

  • Successful POST to /api/document
  • Other /api/* pages and HTTP reqs (will delineate later)
  • /admin/*
  • /annotations/index.jsx
  • /auth/email-signin.js
  • /documents/*

Components:

  • AnnotationCard
  • AnnotationChannel
  • Document
  • FilterPopover
  • HeatMap
  • SemanticField
  • SlateMediaEmbedElement

Sessions:

  • Mock user with 0 groups
  • Mock user with 1 group
  • Mock user with 2+ groups
  • Mock logged-out user
    • After #7 Mock useSession hook in Jest tests #10, since useSession uses mock user data from a logged-in user, any test that involves a component using useSession will now test components as if a user is logged in. We need to write tests for logged-out state as well. (Make useSession return undefined?)

blms added a commit that referenced this issue Dec 29, 2020
blms added a commit that referenced this issue Dec 29, 2020
blms added a commit that referenced this issue Dec 29, 2020
blms added a commit that referenced this issue Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to tests, Jest, mocks, etc
Projects
None yet
Development

No branches or pull requests

1 participant