7ed4884c76
Co-authored-by: Guillaume Chau <guillaume.b.chau@gmail.com>
16 lines
449 B
TypeScript
16 lines
449 B
TypeScript
describe('nullableQuery', () => {
|
|
beforeEach(() => {
|
|
cy.task('db:reset')
|
|
cy.visit('/null-query')
|
|
})
|
|
|
|
it('should enable useQuery only if query is non-null', () => {
|
|
cy.get('button').should('exist')
|
|
cy.wait(100)
|
|
cy.get('[data-test-id="data"]').should('not.exist')
|
|
cy.get('.loading').should('not.exist')
|
|
cy.get('button').click()
|
|
cy.get('[data-test-id="data"]').should('contain', 'Loaded channel: General')
|
|
})
|
|
})
|