-
Notifications
You must be signed in to change notification settings - Fork 66
Add multi index and disjunctive facet search #888
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
Changes from 25 commits
3302604
29bda1f
bb0ef01
07760b6
073adf0
7b4fc20
ee46536
560763d
a224d1a
8179471
4e1fbb2
b33b7d9
4547b56
238ee58
43a3dac
9f06d09
da79ff1
6f79266
0b130d0
e7b7ca8
2daa5c2
c833807
b1f785d
1bf47bf
42edcde
a6ab3fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,24 +38,27 @@ describe(`${playground} playground test`, () => { | |
|
|
||
| it('Sort by recommendationCound ascending', () => { | ||
| const select = `.ais-SortBy-select` | ||
| cy.get(select).select('steam-video-games:recommendationCount:asc') | ||
| cy.get(select).select('games:recommendationCount:asc') | ||
| cy.wait(1000) | ||
| cy.get(HIT_ITEM_CLASS).eq(0).contains('Deathmatch Classic') | ||
| }) | ||
|
|
||
| it('Sort by default relevancy', () => { | ||
| const select = `.ais-SortBy-select` | ||
| cy.get(select).select('steam-video-games') | ||
| cy.get(select).select('games') | ||
| cy.wait(1000) | ||
| cy.get(HIT_ITEM_CLASS).eq(0).contains('Counter-Strike') | ||
| }) | ||
|
|
||
| it('click on facets', () => { | ||
| const checkbox = `.ais-RefinementList-list .ais-RefinementList-checkbox` | ||
| cy.get(checkbox).eq(1).click() | ||
| it('click on facets ensure disjunctive facet search', () => { | ||
| const facet = `.ais-RefinementList-list` | ||
| const checkbox = `.ais-RefinementList-checkbox` | ||
| const facetCount = '.ais-RefinementList-count' | ||
| cy.get(facet).eq(0).find(checkbox).eq(1).click() // genres > action | ||
| cy.wait(1000) | ||
| cy.get(facet).eq(0).find(facetCount).eq(0).contains('5') // genres > action count | ||
| cy.get(facet).eq(1).find(facetCount).eq(0).contains('4') // players > multiplayer | ||
| cy.wait(1000) | ||
bidoubiwa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| cy.get(HIT_ITEM_CLASS).eq(1).contains('Team Fortress Classic') | ||
| cy.get(HIT_ITEM_CLASS).eq(1).contains('4.99 $') | ||
| }) | ||
|
|
||
| it('Search', () => { | ||
|
|
@@ -78,6 +81,6 @@ describe(`${playground} playground test`, () => { | |
|
|
||
| it('Paginate Search', () => { | ||
| cy.get('.ais-InfiniteHits-loadMore').click() | ||
| cy.get(HIT_ITEM_CLASS).should('have.length', 11) | ||
| cy.get(HIT_ITEM_CLASS).should('have.length', 12) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this has been changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because of the disjunctive facet search accepting more hits in return 😅 |
||
| }) | ||
| }) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| const { MeiliSearch } = require('meilisearch') | ||
|
|
||
| const HOST = 'http://localhost:7700' | ||
| const API_KEY = 'masterKey' | ||
|
|
||
| afterAll(async () => { | ||
| const client = new MeiliSearch({ host: HOST, apiKey: API_KEY }) | ||
| await client.deleteIndex('movies') | ||
| const task = await client.deleteIndex('games') | ||
|
|
||
| await client.waitForTask(task.taskUid) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't you have a method that accepts more than one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have one in js :( |
||
| }) | ||
Uh oh!
There was an error while loading. Please reload this page.