-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const WAITING_TIME = Cypress.env('waitingTime') | ||
|
||
describe(`API key modal`, () => { | ||
before(() => { | ||
cy.deleteAllIndexes() | ||
cy.wait(WAITING_TIME) | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.visit('/') | ||
}) | ||
|
||
describe('Landing page', () => { | ||
it('Does not redirect if no API key is set', () => { | ||
cy.url().should('match', /\//) | ||
}) | ||
|
||
it('Should display the default view', () => { | ||
cy.contains( | ||
'This dashboard will help you check the search results with ease.' | ||
) | ||
cy.contains('Set your API key (optional)') | ||
cy.contains('Select an index') | ||
}) | ||
}) | ||
|
||
describe('Opening the modal', () => { | ||
it('Should display a message telling that no api key is required', () => { | ||
cy.get('span').contains('API Key').parent().click() | ||
cy.wait(WAITING_TIME) | ||
cy.get('div[aria-label=settings-api-key]').within(() => { | ||
cy.contains('Enter your admin API key (optional)') | ||
cy.contains('No API key provided.') | ||
}) | ||
}) | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters