Passed all test cases, went through forums, still not able to get Ticket for text-subfield Test

Passed all the test cases for text-subfield.test.js (Chapter1) with following summary:

Determining test suites to run…Setup Mongo Connection
(node:1368) 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 engin
e, pass option { useUnifiedTopology: true } to MongoClient.connect.
PASS test/text-subfield.test.js (7.64s)
Text and Subfield Search
√ Can perform a text search (892ms)
√ Can perform a genre search with one genre (897ms)
√ Can perform a genre search with multiple genres (650ms)
√ Can perform a cast search with one cast member (629ms)
√ Can perform a cast search with multiple cast members (640ms)
√ Can perform a search and return a non-default number of movies per page (909ms)

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

But, after running the application with ‘npm start’ command and checking the status page for results I am still not able to get the ticket for the same test. I am getting the the error message as :
“Text and Subfield Search: Did not receive the proper response when searching by genre”

Tried different methods and going through the discussion forms till the last due date. Nothing worked so far. Any help is greatly appreciated.
Thanks in advance!

Sending you a direct message. :slight_smile:


Hi Kanika,

I have the same problem.
Running the test command I pass every test, but on status page I receive "Text and Subfield Search: Did not receive the proper response when searching by genre”

Thanx in advance

Hi @Sarma_Crea, welcome to the community.
As mentioned in the Ticket:

Given an array of one or more genres, construct a query that searches
MongoDB for movies with that genre.

Are you sure you are leveraging an operator in your query object that selects the documents where the value of a field equals any value in the specified array?
If not, please make the required changes and hopefully your issue will be resolved.

In case I am missing something or you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

1 Like

Hi @SourabhBagrecha,
thank you very much for your support.
I was able to solve the problem.
I hadn’t focused my attention on:

const searchGenre = Array.isArray (genre)? genre: genre.split (",")

and then I had built a wrong query like

const query = {genres: {$ in: [… genre]}}.

Then I realized that I had to use another variable.

Thanks again and have a nice day

1 Like