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

initial setup for search test #2757

Merged
merged 1 commit into from Feb 1, 2022
Merged

Conversation

JiaHua-Zou
Copy link
Contributor

@JiaHua-Zou JiaHua-Zou commented Jan 27, 2022

Issue This PR Addresses

This PR fixes part of the #2621

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

initial setup files for the search tests.
So far it only has 1 simple test and it test the status if no params are given. More test will be added:

  • testing the number of results return.
  • testing for status return of 200 and 503.
  • testing for giving part of the params.
  • testing for max page number
  • testing for author filter

To run it: pnpm test search

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@gitpod-io
Copy link

gitpod-io bot commented Jan 27, 2022

@humphd
Copy link
Contributor

humphd commented Jan 27, 2022

@JiaHua-Zou can you add a proper description for this, discuss what it does, how to test it, what it's missing (e.g., what's coming next), which issues this fixes or is part of, etc.

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty close, a couple small bits to fix.

src/api/search/test/query.test.js Outdated Show resolved Hide resolved
src/api/search/test/query.test.js Outdated Show resolved Hide resolved
RC-Lee
RC-Lee previously approved these changes Jan 27, 2022
Add the setup path
Copy link
Contributor

@RC-Lee RC-Lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@HyperTHD HyperTHD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. mdx being broken means master will break if we merge this in which is why I wanna wait to approve it

@JiaHua-Zou JiaHua-Zou merged commit 9cfc73a into Seneca-CDOT:master Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: test Creation and development of test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for search
5 participants