Skip to content

Commit 585aa44

Browse files
committed
test: failing e2e test for number of entries
1 parent d506fb5 commit 585aa44

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

cypress/e2e/admin.cy.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe('Strapi meilisearch plugin - administrator', () => {
127127

128128
cy.checkCollectionContent({ rowNb: 1, contains: ['1 / 1'] })
129129
cy.checkCollectionContent({ rowNb: 2, contains: ['2 / 2'] })
130-
cy.checkCollectionContent({ rowNb: 3, contains: ['3 / 6'] })
130+
cy.checkCollectionContent({ rowNb: 3, contains: ['3 / 3'] })
131131
cy.checkCollectionContent({ rowNb: 4, contains: ['2 / 2'] })
132132
cy.checkCollectionContent({
133133
rowNb: 5,
@@ -204,7 +204,7 @@ describe('Strapi meilisearch plugin - administrator', () => {
204204

205205
cy.checkCollectionContent({ rowNb: 1, contains: ['0 / 1'] })
206206
cy.checkCollectionContent({ rowNb: 2, contains: ['2 / 2'] })
207-
cy.checkCollectionContent({ rowNb: 3, contains: ['3 / 6'] })
207+
cy.checkCollectionContent({ rowNb: 3, contains: ['3 / 3'] })
208208
cy.checkCollectionContent({ rowNb: 4, contains: ['2 / 2'] })
209209
cy.checkCollectionContent({
210210
rowNb: 5,
@@ -239,14 +239,30 @@ describe('Strapi meilisearch plugin - administrator', () => {
239239

240240
cy.checkCollectionContent({ rowNb: 1, contains: ['0 / 1'] })
241241
cy.checkCollectionContent({ rowNb: 2, contains: ['0 / 2'] })
242-
cy.checkCollectionContent({ rowNb: 3, contains: ['0 / 6'] })
242+
cy.checkCollectionContent({ rowNb: 3, contains: ['0 / 3'] })
243243
cy.checkCollectionContent({ rowNb: 4, contains: ['0 / 2'] })
244244
cy.checkCollectionContent({
245245
rowNb: 5,
246246
contains: ['0 / 6200'],
247247
})
248248
})
249249

250+
it('Add about-us collection back to Meilisearch, should index of only 1 as multiple collections are in single index', () => {
251+
cy.openPluginPage(adminUrl)
252+
253+
cy.clickAndCheckRowContent({
254+
rowNb: 2,
255+
contains: ['about-us', 'Yes', 'Hooked'],
256+
})
257+
258+
cy.checkCollectionContent({ rowNb: 2, contains: ['1 / 2'] })
259+
260+
cy.clickAndCheckRowContent({
261+
rowNb: 2,
262+
contains: ['No', 'Reload needed'],
263+
})
264+
})
265+
250266
it('Change host to wrong host', () => {
251267
const wrongHost = 'http://localhost:1234'
252268

0 commit comments

Comments
 (0)