hotkeys-modal-bottom-text.test.js 671 B

123456789101112131415161718192021
  1. import { render, screen } from '@testing-library/react'
  2. import { expect } from 'chai'
  3. import HotkeysModalBottomText from '../../../../../frontend/js/features/hotkeys-modal/components/hotkeys-modal-bottom-text'
  4. describe('<HotkeysModalBottomText />', function () {
  5. it('renders the correct text', function () {
  6. render(<HotkeysModalBottomText />)
  7. screen.getByText(
  8. /A more comprehensive list of keyboard shortcuts can be found in/
  9. )
  10. const link = screen.getByRole('link', {
  11. name: /this Overleaf project template/,
  12. })
  13. expect(link.getAttribute('href')).to.equal(
  14. `/articles/overleaf-keyboard-shortcuts/qykqfvmxdnjf`
  15. )
  16. })
  17. })