|
@@ -10,7 +10,7 @@ const Container: FC = ({ children }) => (
|
|
|
<div style={{ width: 785, height: 785 }}>{children}</div>
|
|
<div style={{ width: 785, height: 785 }}>{children}</div>
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-describe('<CodeMirrorEditor/> in Rich Text mode', function () {
|
|
|
|
|
|
|
+describe('<CodeMirrorEditor/> in Visual mode', function () {
|
|
|
beforeEach(function () {
|
|
beforeEach(function () {
|
|
|
window.metaAttributesCache.set('ol-preventCompileOnLoad', true)
|
|
window.metaAttributesCache.set('ol-preventCompileOnLoad', true)
|
|
|
window.metaAttributesCache.set(
|
|
window.metaAttributesCache.set(
|
|
@@ -46,6 +46,10 @@ describe('<CodeMirrorEditor/> in Rich Text mode', function () {
|
|
|
cy.get('@first-line').click()
|
|
cy.get('@first-line').click()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ afterEach(function () {
|
|
|
|
|
+ window.metaAttributesCache.clear()
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
forEach(['LaTeX', 'TeX']).it('renders the %s logo', function (logo) {
|
|
forEach(['LaTeX', 'TeX']).it('renders the %s logo', function (logo) {
|
|
|
cy.get('@first-line').type(`\\${logo}{{}}{Enter}`)
|
|
cy.get('@first-line').type(`\\${logo}{{}}{Enter}`)
|
|
|
cy.get('@first-line').should('have.text', logo)
|
|
cy.get('@first-line').should('have.text', logo)
|
|
@@ -374,6 +378,14 @@ describe('<CodeMirrorEditor/> in Rich Text mode', function () {
|
|
|
cy.get('.ol-cm-author').should('have.text', 'Author')
|
|
cy.get('.ol-cm-author').should('have.text', 'Author')
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ it('decorates footnotes', function () {
|
|
|
|
|
+ cy.get('@first-line').type('Foo \\footnote{{}Bar.} ')
|
|
|
|
|
+ cy.get('@first-line').should('contain', 'Foo')
|
|
|
|
|
+ cy.get('@first-line').should('not.contain', 'Bar')
|
|
|
|
|
+ cy.get('@first-line').type('{leftArrow}')
|
|
|
|
|
+ cy.get('@first-line').should('have.text', 'Foo \\footnote{Bar.} ')
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
// TODO: \input
|
|
// TODO: \input
|
|
|
// TODO: Math
|
|
// TODO: Math
|
|
|
// TODO: Abstract
|
|
// TODO: Abstract
|