mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #19528 from overleaf/dp-equation-preview
Equation Preview GitOrigin-RevId: 98e71e5d2c1a83d6c9fa685eeee1f4b93a5a3da1
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
import { screen, within } from '@testing-library/dom'
|
||||
import { expect } from 'chai'
|
||||
import fetchMock from 'fetch-mock'
|
||||
import SettingsMathPreview from '@/features/editor-left-menu/components/settings/settings-math-preview'
|
||||
import { renderWithEditorContext } from '../../../../helpers/render-with-context'
|
||||
|
||||
describe('<SettingsMathPreview />', function () {
|
||||
afterEach(function () {
|
||||
fetchMock.reset()
|
||||
})
|
||||
|
||||
it('shows correct menu', async function () {
|
||||
renderWithEditorContext(<SettingsMathPreview />)
|
||||
|
||||
const select = screen.getByLabelText('Equation preview')
|
||||
|
||||
const optionOn = within(select).getByText('On')
|
||||
expect(optionOn.getAttribute('value')).to.equal('true')
|
||||
|
||||
const optionOff = within(select).getByText('Off')
|
||||
expect(optionOff.getAttribute('value')).to.equal('false')
|
||||
})
|
||||
})
|
||||
@@ -54,6 +54,7 @@ const defaultUserSettings = {
|
||||
autoPairDelimiters: true,
|
||||
trackChanges: true,
|
||||
syntaxValidation: false,
|
||||
mathPreview: true,
|
||||
}
|
||||
|
||||
export function EditorProviders({
|
||||
|
||||
Reference in New Issue
Block a user