overleaf/services/web/test/frontend/components/shared/beta-badge.spec.js
Alf Eaton 53324b0cd2 Add Cypress React component testing (#6974)
GitOrigin-RevId: 1260312a0644f3bc60e007a840045974336e264d
2022-04-05 12:17:30 +00:00

18 lines
430 B
JavaScript

import { mount } from '@cypress/react'
import BetaBadge from '../../../../frontend/js/shared/components/beta-badge'
describe('beta badge', function () {
it('renders the url and tooltip text', function () {
mount(
<BetaBadge
url="/foo"
tooltip={{
id: 'test-tooltip',
text: 'This is a test',
}}
/>
)
cy.get('a[href="/foo"]').contains('This is a test')
})
})