Skip to content

Commit 377bb0c

Browse files
authored
Merge pull request #584 from meilisearch/chore/cleanup-test-select-index
Clean up `test select index` test case
2 parents 448f91b + 96adbf4 commit 377bb0c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cypress/e2e/test-select-indexes.cy.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe(`Test indexes`, () => {
77
cy.deleteAllIndexes()
88
cy.wait(WAITING_TIME)
99

10-
cy.createIndex('lovies')
10+
cy.createIndex('empty_index')
1111
cy.wait(WAITING_TIME)
1212
cy.createIndex('movies')
1313
cy.wait(WAITING_TIME)
@@ -31,12 +31,17 @@ describe(`Test indexes`, () => {
3131
cy.wait(WAITING_TIME)
3232
})
3333

34+
after(() => {
35+
cy.deleteAllIndexes()
36+
cy.wait(WAITING_TIME)
37+
})
38+
3439
beforeEach(() => {
3540
cy.visit('/')
3641
})
3742

3843
it('Should display the first index based on localeCompare order on the uid', () => {
39-
cy.get('button[aria-haspopup=menu]').contains('lovies 0')
44+
cy.get('button[aria-haspopup=menu]').contains('empty_index 0')
4045
})
4146

4247
it('Should list all the indexes inside the select', () => {
@@ -46,7 +51,7 @@ describe(`Test indexes`, () => {
4651
.children()
4752
.should(($p) => {
4853
expect($p).to.have.length(3)
49-
expect($p).to.contain('lovies 0')
54+
expect($p).to.contain('empty_index 0')
5055
expect($p).to.contain('movies 33')
5156
expect($p).to.contain('pokemon 3')
5257
})
@@ -79,9 +84,4 @@ describe(`Test indexes`, () => {
7984
cy.contains('Bulbasaur')
8085
})
8186
})
82-
83-
after(() => {
84-
cy.deleteAllIndexes()
85-
cy.wait(WAITING_TIME)
86-
})
8787
})

0 commit comments

Comments
 (0)