M220JS - Chapter 1 - Text and subfields Search - Don't pass the status page controll

Hi,

I'm new in this forum.

I am doing the work in question.
By running the command “npm test -t text-subfield” I can successfully pass all the tests, but when I go to the status page to get the verification code I get the following error: "Text and Subfield Search: Did not receive the proper response when searching by genre ".

npm test -t text-subfield

server@1.0.0 test E:\mflix-js
jest --passWithNoTests “text-subfield”

Determining test suites to run…Setup Mongo Connection
(node:11208) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to MongoClient.connect.
(Use node --trace-deprecation ... to show where the warning was created)
PASS test/text-subfield.test.js
Text and Subfield Search
√ Can perform a text search (107ms)
√ Can perform a genre search with one genre (204ms)
√ Can perform a genre search with multiple genres (246ms)
√ Can perform a cast search with one cast member (263ms)
√ Can perform a cast search with multiple cast members (270ms)
√ Can perform a search and return a non-default number of movies per page (297ms)

Test Suites: 1 passed, 1 total
Tests: 6 passed, 6 total
Snapshots: 0 total
Time: 4.162s, estimated 6s
Ran all test suites matching /text-subfield/i.
Teardown Mongo Connection

E:\mflix-js (server@1.0.0)
λ npm start

server@1.0.0 start E:\mflix-js
nodemon -L ./index.js

[nodemon] 1.19.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node ./index.js
Browserslist: caniuse-lite is outdated. Please run next command npm update
(node:11644) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to MongoClient.connect.
(Use node --trace-deprecation ... to show where the warning was created)
listening on port 5000
GET /status/ 304 6.447 ms - -
GET /static/css/main.d2c98b4b.chunk.css 304 4.343 ms - -
GET /static/js/main.02d67aeb.chunk.js 304 1.061 ms - -
GET /static/js/1.908cc23a.chunk.js 304 9.024 ms - -
GET /static/media/mongoleaf.0ebc1843.png 304 0.773 ms - -
GET /static/media/pixelatedLeaf.6c93bd20.svg 304 0.845 ms - -
GET /manifest.json 304 1.231 ms - -
GET /api/v1/movies/search?cast=Kevin%20Connolly 304 144.593 ms - -
GET /api/v1/movies/search?text=shawshank 200 63.405 ms - 3500
GET /api/v1/movies/search?genre=Talk-Show 304 124.265 ms - -

Try going in the home page first.

Thanks for the reply.
Done, but unfortunately I get the same result

I tried to search directly from the home page.
I entered “Drama” and selected “genre”.
The page keeps loading, but doesn’t show any results.

the monitor shows this:

E:\mflix-js (server@1.0.0)
λ npm start

server@1.0.0 start E:\mflix-js
nodemon -L ./index.js

[nodemon] 1.19.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node ./index.js
Browserslist: caniuse-lite is outdated. Please run next command npm update
(node:13032) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to MongoClient.connect.
(Use node --trace-deprecation ... to show where the warning was created)
listening on port 5000
GET / 304 8.719 ms - -
GET /static/css/main.d2c98b4b.chunk.css 304 2.675 ms - -
GET /static/js/1.908cc23a.chunk.js 304 3.395 ms - -
GET /static/js/main.02d67aeb.chunk.js 304 6.241 ms - -
GET /static/media/mongoleaf.0ebc1843.png 304 2.066 ms - -
GET /manifest.json 304 0.846 ms - -
GET /api/v1/movies/ 304 453.088 ms - -
GET /api/v1/movies/facet-search?cast=Denzel%20Washington&page=0 304 581.722 ms - -
GET /api/v1/movies/search?genre=Drama 200 133.925 ms - 90

Good morning everyone.
Could someone help me that I’m stuck.
Thanks in advance

Yeah.
I was able to find where I was wrong.
I was using a variable name incorrectly

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.