meilisearch/mini-dashboard

deleteAllIndexes should also be added in test-api-key-required.cy file

bidoubiwa opened this issue · 4 comments

In the e2e tests runned by Cypress, most of the files delete all indexes to reset the environment before testing.
The file test-api-key-required.cy.js does not delete all indexes in a before function.

Unfortunately, a test from that files requires that there are no indexes currently on the Meilisearch instance.

To tackle that issue, we need to add a before method in that test file, running deleteAllIndexes.

See example here:

Hello! Can I work on it?

Hey @developer-diganta ! Yes go ahaid :)

If I am correct, I should add the before method after the beforeEach one?

Before, we have to delete all indexes before starting to run the tests. It only has to be done one time.