🧪 Add delete tests on dashboard
This commit is contained in:
@@ -90,7 +90,12 @@ export const TypebotButton = ({
|
|||||||
{...listeners}
|
{...listeners}
|
||||||
{...attributes}
|
{...attributes}
|
||||||
>
|
>
|
||||||
<MoreButton pos="absolute" top="10px" right="10px">
|
<MoreButton
|
||||||
|
pos="absolute"
|
||||||
|
top="10px"
|
||||||
|
right="10px"
|
||||||
|
aria-label="Show typebot menu"
|
||||||
|
>
|
||||||
<MenuItem onClick={handleDuplicateClick}>Duplicate</MenuItem>
|
<MenuItem onClick={handleDuplicateClick}>Duplicate</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
color="red"
|
color="red"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ describe('Dashboard page', () => {
|
|||||||
cy.signOut()
|
cy.signOut()
|
||||||
})
|
})
|
||||||
|
|
||||||
test('folders navigation should work', () => {
|
it('folders navigation should work', () => {
|
||||||
cy.signIn('test1@gmail.com')
|
cy.signIn('test1@gmail.com')
|
||||||
cy.visit('/typebots')
|
cy.visit('/typebots')
|
||||||
createFolder('My folder #1')
|
createFolder('My folder #1')
|
||||||
@@ -26,7 +26,22 @@ describe('Dashboard page', () => {
|
|||||||
cy.findByDisplayValue('My folder #2').should('not.exist')
|
cy.findByDisplayValue('My folder #2').should('not.exist')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('folders should be draggable and droppable', () => {
|
it('folders and typebots should be deletable', () => {
|
||||||
|
cy.signIn('test2@gmail.com')
|
||||||
|
cy.visit('/typebots')
|
||||||
|
cy.findByText('Folder #1').should('exist')
|
||||||
|
cy.findAllByRole('button', { name: 'Show folder menu' }).first().click()
|
||||||
|
cy.findByRole('menuitem', { name: 'Delete' }).click()
|
||||||
|
cy.findByRole('button', { name: 'Delete' }).click()
|
||||||
|
cy.findByText('Folder #1').should('not.exist')
|
||||||
|
cy.findByText('Typebot #1').should('exist')
|
||||||
|
cy.findAllByRole('button', { name: 'Show typebot menu' }).first().click()
|
||||||
|
cy.findByRole('menuitem', { name: 'Delete' }).click()
|
||||||
|
cy.findByRole('button', { name: 'Delete' }).click()
|
||||||
|
cy.findByText('Typebot #1').should('not.exist')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('folders should be draggable and droppable', () => {
|
||||||
cy.signIn('test2@gmail.com')
|
cy.signIn('test2@gmail.com')
|
||||||
cy.visit('/typebots')
|
cy.visit('/typebots')
|
||||||
cy.findByTestId('typebot-button-typebot1').mouseMoveBy(-100, 0, {
|
cy.findByTestId('typebot-button-typebot1').mouseMoveBy(-100, 0, {
|
||||||
|
|||||||
Reference in New Issue
Block a user