overleaf/services/web/test/frontend/features/hotkeys-modal/components/hotkeys-modal-bottom-text.test.js
M Fahru 6dcc22642a Update "go to line" hotkey for cm6 and add new info text in hotkeys modal
* Update "go to line" hotkey for cm6 and add new info text in hotkeys modal

* Differentiate modal title between cm6 and ace hotkeys

* Update test to reflect change in hotkeys modal title

* Add test for hotkeys modal bottom text

* Update test on editor left menu hotkeys button to reflect change in hotkeys modal title

GitOrigin-RevId: 61bae16313ea7a37fa3b9441dbe5a93ab7823d01
2022-11-25 09:04:20 +00:00

21 lines
671 B
JavaScript

import { render, screen } from '@testing-library/react'
import { expect } from 'chai'
import HotkeysModalBottomText from '../../../../../frontend/js/features/hotkeys-modal/components/hotkeys-modal-bottom-text'
describe('<HotkeysModalBottomText />', function () {
it('renders the correct text', function () {
render(<HotkeysModalBottomText />)
screen.getByText(
/A more comprehensive list of keyboard shortcuts can be found in/
)
const link = screen.getByRole('link', {
name: /this Overleaf project template/,
})
expect(link.getAttribute('href')).to.equal(
`/articles/overleaf-keyboard-shortcuts/qykqfvmxdnjf`
)
})
})