RocketChat / RocketChat/Rocket.Chat
The deprecated parameter "query" in the endpoint "/api/v1/directory" fails a test case
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When you start meteor with the environment variable TEST_MODE=true, there is a warning that says "The parameter 'query' in the endpoint '/api/v1/directory' is deprecated and will be removed in version 7.0.0".
While running the tests using meteor npm run test, it fails on the test named "should return an object containing rooms and totalCount from teams". The last request made by this test case queries /api/v1/directory.
Steps to reproduce:
- Visit
Assist with Testing Rocket.Chat - Follow the steps and run the test cases.
Expected behavior:
Test should return an object containing rooms and totalCount from teams should not query the endpoint /api/v1/directory.
Actual behavior:
Test should return an object containing rooms and totalCount from teams queries the endpoint /api/v1/directory.
Server Setup Information:
- Version of Rocket.Chat Server: 6.5.0-develop
- Operating System: macOS 13.4.1 (22F82)
- Deployment Method:
- Number of Running Instances:
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.21.4 - x64
- MongoDB Version: 6.0.3
Client Setup Information
- Desktop App or Browser Version:
- Operating System:
Additional context
Relevant logs:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the test named "should return an object containing rooms and totalCount from teams" and inspect its last request to /api/v1/directory. Run the relevant tests with meteor npm run test; done means this test no longer queries the endpoint with the deprecated query parameter and the warning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100