mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
d50271c1e9
[DeleteAccount] Create Modal with Form GitOrigin-RevId: 611f08c7253f59d91c6937b79c80a386b9d21ccd
26 lines
692 B
TypeScript
26 lines
692 B
TypeScript
import { expect } from 'chai'
|
|
import { screen, render } from '@testing-library/react'
|
|
import fetchMock from 'fetch-mock'
|
|
|
|
import LeaveModalContent from '../../../../../../frontend/js/features/settings/components/leave/modal-content'
|
|
|
|
describe('<LeaveModalContent />', function () {
|
|
afterEach(function () {
|
|
fetchMock.reset()
|
|
})
|
|
|
|
it('disable delete button if form is not valid', function () {
|
|
render(
|
|
<LeaveModalContent
|
|
handleHide={() => {}}
|
|
inFlight={false}
|
|
setInFlight={() => {}}
|
|
/>
|
|
)
|
|
|
|
const deleteButton = screen.getByRole('button', {
|
|
name: 'Delete',
|
|
})
|
|
expect(deleteButton.hasAttribute('disabled')).to.be.true
|
|
})
|
|
})
|