mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:23:10 +00:00
Merge pull request #17707 from overleaf/AR-modal-close-consistency-fixes
Modal "Close" button consistency fixes GitOrigin-RevId: 55e5178c9e820fffd220f0010906546f0baa2065
This commit is contained in:
parent
683ea90f64
commit
1c1b48edab
7 changed files with 11 additions and 9 deletions
|
@ -84,7 +84,7 @@ export default function DictionaryModalContent({
|
|||
|
||||
<Modal.Footer>
|
||||
<Button bsStyle={null} className="btn-secondary" onClick={handleHide}>
|
||||
{t('done')}
|
||||
{t('close')}
|
||||
</Button>
|
||||
</Modal.Footer>
|
||||
</>
|
||||
|
|
|
@ -23,7 +23,7 @@ export default function HotkeysModal({
|
|||
animation={animation}
|
||||
>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>{t('hotkeys')} (Source editor)</Modal.Title>
|
||||
<Modal.Title>{t('hotkeys')}</Modal.Title>
|
||||
</Modal.Header>
|
||||
|
||||
<Modal.Body className="hotkeys-modal">
|
||||
|
@ -192,7 +192,7 @@ export default function HotkeysModal({
|
|||
|
||||
<Modal.Footer>
|
||||
<Button bsStyle={null} className="btn-secondary" onClick={handleHide}>
|
||||
{t('ok')}
|
||||
{t('close')}
|
||||
</Button>
|
||||
</Modal.Footer>
|
||||
</AccessibleModal>
|
||||
|
|
|
@ -77,7 +77,7 @@ export default function WordCountModalContent({ handleHide }) {
|
|||
|
||||
<Modal.Footer>
|
||||
<Button bsStyle={null} className="btn-secondary" onClick={handleHide}>
|
||||
{t('done')}
|
||||
{t('close')}
|
||||
</Button>
|
||||
</Modal.Footer>
|
||||
</>
|
||||
|
|
|
@ -13,7 +13,7 @@ const WordCountModal = React.memo(function WordCountModal({
|
|||
animation
|
||||
show={show}
|
||||
onHide={handleHide}
|
||||
id="clone-project-modal"
|
||||
id="word-count-modal"
|
||||
>
|
||||
<WordCountModalContent handleHide={handleHide} />
|
||||
</AccessibleModal>
|
||||
|
|
|
@ -800,7 +800,7 @@ describe('<EditorLeftMenu />', function () {
|
|||
)
|
||||
|
||||
cy.findByRole('button', { name: 'Show Hotkeys' }).click()
|
||||
cy.findByText('Hotkeys (Source editor)')
|
||||
cy.findByText('Hotkeys')
|
||||
})
|
||||
|
||||
it('shows correct url for documentation', function () {
|
||||
|
|
|
@ -17,8 +17,10 @@ describe('<SettingsDictionary />', function () {
|
|||
within(modal).getByRole('heading', { name: 'Edit Dictionary' })
|
||||
within(modal).getByText('Your custom dictionary is empty.')
|
||||
|
||||
const doneButton = within(modal).getByRole('button', { name: 'Done' })
|
||||
fireEvent.click(doneButton)
|
||||
const [, closeButton] = within(modal).getAllByRole('button', {
|
||||
name: 'Close',
|
||||
})
|
||||
fireEvent.click(closeButton)
|
||||
expect(screen.queryByRole('dialog')).to.be.null
|
||||
})
|
||||
})
|
||||
|
|
|
@ -14,7 +14,7 @@ describe('<HotkeysModal />', function () {
|
|||
const { baseElement } = render(<HotkeysModal {...modalProps} />)
|
||||
|
||||
expect(baseElement.querySelector('.modal-title').textContent).to.equal(
|
||||
'Hotkeys (Source editor)'
|
||||
'Hotkeys'
|
||||
)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue