⚗️ Add infinite scroll in results table
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
describe('ResultsPage', () => {
|
||||
before(() => {
|
||||
cy.intercept({ url: '/api/typebots/typebot2/results?', method: 'GET' }).as(
|
||||
cy.intercept({ url: '/api/typebots/typebot2/results*', method: 'GET' }).as(
|
||||
'getResults'
|
||||
)
|
||||
cy.intercept({ url: '/api/typebots/typebot2/results*', method: 'GET' }).as(
|
||||
'getResults'
|
||||
)
|
||||
})
|
||||
@ -13,19 +16,32 @@ describe('ResultsPage', () => {
|
||||
cy.signIn('test2@gmail.com')
|
||||
cy.visit('/typebots/typebot2/results')
|
||||
cy.wait('@getResults')
|
||||
cy.findByText('content 2').should('exist')
|
||||
cy.findByText('content 3').should('exist')
|
||||
cy.findByText('content198').should('exist')
|
||||
cy.findByText('content197').should('exist')
|
||||
cy.findAllByRole('checkbox').eq(2).check({ force: true })
|
||||
cy.findAllByRole('checkbox').eq(3).check({ force: true })
|
||||
cy.findByRole('button', { name: 'Delete 2' }).click()
|
||||
cy.findByRole('button', { name: 'Delete 2' }).click({ force: true })
|
||||
cy.findByRole('button', { name: 'Delete' }).click()
|
||||
cy.findByText('content 2').should('not.exist')
|
||||
cy.findByText('content 3').should('not.exist')
|
||||
cy.findByText('content198').should('not.exist')
|
||||
cy.findByText('content197').should('not.exist')
|
||||
cy.wait(200)
|
||||
cy.findAllByRole('checkbox').first().check({ force: true })
|
||||
cy.findByRole('button', { name: 'Delete 198' }).click({ force: true })
|
||||
cy.findByRole('button', { name: 'Delete' }).click()
|
||||
cy.findAllByRole('row').should('have.length', 1)
|
||||
})
|
||||
|
||||
it.only('submissions table should have infinite scroll', () => {
|
||||
it('submissions table should have infinite scroll', () => {
|
||||
cy.signIn('test2@gmail.com')
|
||||
cy.visit('/typebots/typebot2/results')
|
||||
cy.wait('@getResults')
|
||||
cy.findByText('content50').should('not.exist')
|
||||
cy.findByText('content199').should('exist')
|
||||
cy.findByTestId('table-wrapper').scrollTo('bottom')
|
||||
cy.findByText('content149').should('exist')
|
||||
cy.findByTestId('table-wrapper').scrollTo('bottom')
|
||||
cy.findByText('content99').should('exist')
|
||||
cy.findByTestId('table-wrapper').scrollTo('bottom')
|
||||
cy.findByText('content50').should('exist')
|
||||
cy.findByText('content0').should('exist')
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user