|
@@ -154,6 +154,9 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
|
|
|
|
|
clickToolbarButton('Numbered List')
|
|
clickToolbarButton('Numbered List')
|
|
|
|
|
|
|
|
|
|
+ // expose the markup
|
|
|
|
|
+ cy.get('.cm-line').eq(0).type('{rightArrow}')
|
|
|
|
|
+
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
@@ -164,12 +167,8 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
].join('')
|
|
].join('')
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- cy.get('.cm-line').eq(1).click()
|
|
|
|
|
-
|
|
|
|
|
clickToolbarButton('Bullet List')
|
|
clickToolbarButton('Bullet List')
|
|
|
|
|
|
|
|
- cy.get('.cm-line').eq(1).click()
|
|
|
|
|
-
|
|
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
@@ -187,6 +186,9 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
|
|
|
|
|
clickToolbarButton('Numbered List')
|
|
clickToolbarButton('Numbered List')
|
|
|
|
|
|
|
|
|
|
+ // expose the markup
|
|
|
|
|
+ cy.get('.cm-line').eq(0).type('{rightArrow}')
|
|
|
|
|
+
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
@@ -197,12 +199,8 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
].join('')
|
|
].join('')
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- cy.get('.cm-line').eq(0).click()
|
|
|
|
|
-
|
|
|
|
|
clickToolbarButton('Numbered List')
|
|
clickToolbarButton('Numbered List')
|
|
|
|
|
|
|
|
- cy.get('.cm-line').eq(0).click()
|
|
|
|
|
-
|
|
|
|
|
cy.get('.cm-content').should('have.text', 'test')
|
|
cy.get('.cm-content').should('have.text', 'test')
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -212,6 +210,9 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
|
|
|
|
|
clickToolbarButton('Numbered List')
|
|
clickToolbarButton('Numbered List')
|
|
|
|
|
|
|
|
|
|
+ // expose the markup
|
|
|
|
|
+ cy.get('.cm-line').eq(1).type('{rightArrow}')
|
|
|
|
|
+
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
@@ -227,23 +228,26 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
|
|
|
|
|
clickToolbarButton('Increase Indent')
|
|
clickToolbarButton('Increase Indent')
|
|
|
|
|
|
|
|
|
|
+ // expose the markup
|
|
|
|
|
+ cy.get('.cm-line').eq(1).type('{rightArrow}')
|
|
|
|
|
+
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
|
//
|
|
//
|
|
|
- '\\begin{enumerate}',
|
|
|
|
|
' test',
|
|
' test',
|
|
|
' \\begin{enumerate}',
|
|
' \\begin{enumerate}',
|
|
|
' test',
|
|
' test',
|
|
|
' \\end{enumerate}',
|
|
' \\end{enumerate}',
|
|
|
- '\\end{enumerate}',
|
|
|
|
|
].join('')
|
|
].join('')
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- cy.get('.cm-line').eq(2).click()
|
|
|
|
|
|
|
+ cy.get('.cm-line').eq(1).click()
|
|
|
|
|
|
|
|
clickToolbarButton('Numbered List')
|
|
clickToolbarButton('Numbered List')
|
|
|
|
|
|
|
|
|
|
+ cy.get('.cm-line').eq(0).type('{upArrow}')
|
|
|
|
|
+
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
@@ -262,6 +266,9 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
|
|
|
|
|
clickToolbarButton('Numbered List')
|
|
clickToolbarButton('Numbered List')
|
|
|
|
|
|
|
|
|
|
+ // expose the markup
|
|
|
|
|
+ cy.get('.cm-line').eq(1).type('{rightArrow}')
|
|
|
|
|
+
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
@@ -277,24 +284,26 @@ describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {
|
|
|
|
|
|
|
|
clickToolbarButton('Increase Indent')
|
|
clickToolbarButton('Increase Indent')
|
|
|
|
|
|
|
|
|
|
+ // expose the markup
|
|
|
|
|
+ cy.get('.cm-line').eq(1).type('{rightArrow}')
|
|
|
|
|
+
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|
|
|
[
|
|
[
|
|
|
//
|
|
//
|
|
|
- '\\begin{enumerate}',
|
|
|
|
|
' test',
|
|
' test',
|
|
|
' \\begin{enumerate}',
|
|
' \\begin{enumerate}',
|
|
|
' test',
|
|
' test',
|
|
|
' \\end{enumerate}',
|
|
' \\end{enumerate}',
|
|
|
- '\\end{enumerate}',
|
|
|
|
|
].join('')
|
|
].join('')
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- cy.get('.cm-line').eq(1).click()
|
|
|
|
|
|
|
+ cy.get('.cm-line').eq(0).click()
|
|
|
|
|
|
|
|
clickToolbarButton('Numbered List')
|
|
clickToolbarButton('Numbered List')
|
|
|
|
|
|
|
|
- cy.get('.cm-line').eq(1).click()
|
|
|
|
|
|
|
+ // expose the markup
|
|
|
|
|
+ cy.get('.cm-line').eq(1).type('{rightArrow}')
|
|
|
|
|
|
|
|
cy.get('.cm-content').should(
|
|
cy.get('.cm-content').should(
|
|
|
'have.text',
|
|
'have.text',
|