зеркало из https://github.com/nextcloud/text.git
fix: Smart picker/code block tests after changes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
2eed4ce3ea
Коммит
a53295aa0f
|
@ -31,14 +31,14 @@ describe('Smart picker', () => {
|
|||
})
|
||||
|
||||
cy.getContent()
|
||||
.click()
|
||||
.click({ force: true })
|
||||
|
||||
cy.getContent()
|
||||
.type('Heading{enter}Hello World{enter}')
|
||||
|
||||
cy.getContent()
|
||||
.find('h1 [data-node-view-content]')
|
||||
.should('have.text', 'Hello world')
|
||||
.should('have.text', 'Hello World')
|
||||
})
|
||||
|
||||
it('Insert a link with the smart picker', () => {
|
||||
|
@ -57,7 +57,7 @@ describe('Smart picker', () => {
|
|||
})
|
||||
|
||||
cy.getContent()
|
||||
.click()
|
||||
.click({ force: true })
|
||||
|
||||
cy.getContent()
|
||||
.type('{enter}')
|
||||
|
|
|
@ -45,7 +45,7 @@ describe('Front matter support', function() {
|
|||
// Remove language
|
||||
cy.getContent().find('.code-block').eq(1).find('.view-switch button').click()
|
||||
cy.get('.action-input__text-label').contains('Code block language')
|
||||
cy.get('.input-field__input').clear()
|
||||
cy.get('.input-field__input:visible').clear()
|
||||
|
||||
cy.getContent().find('code').eq(1).click()
|
||||
|
||||
|
@ -54,7 +54,7 @@ describe('Front matter support', function() {
|
|||
// Re-add language
|
||||
cy.getContent().find('.code-block').eq(1).find('.view-switch button').click()
|
||||
cy.get('.action-input__text-label').contains('Code block language')
|
||||
cy.get('.input-field__input').type('javascript')
|
||||
cy.get('.input-field__input:visible').type('javascript')
|
||||
|
||||
cy.getContent().find('code').eq(1).find('.hljs-keyword').eq(0).contains('const')
|
||||
cy.getContent().find('code').eq(1).find('.hljs-string').eq(0).contains('"bar"')
|
||||
|
|
|
@ -87,7 +87,7 @@ export default () => createSuggestions({
|
|||
icon: p.icon_url,
|
||||
providerId: p.id,
|
||||
}
|
||||
}),
|
||||
}).filter(e => e?.label?.toLowerCase?.()?.includes(query.toLowerCase())),
|
||||
...formattingSuggestions(query)
|
||||
.filter(({ action, isActive }) => {
|
||||
const canRunState = action(editor?.can())
|
||||
|
|
Загрузка…
Ссылка в новой задаче