Skip to content

Commit

Permalink
fix: Smart picker/code block tests after changes
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliushaertl committed Aug 29, 2023
1 parent dc5cba4 commit 83f4127
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/SmartPicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -57,7 +57,7 @@ describe('Smart picker', () => {
})

cy.getContent()
.click()
.click({ force: true })

cy.getContent()
.type('{enter}')
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/nodes/CodeBlock.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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"')
Expand Down
2 changes: 1 addition & 1 deletion src/components/Suggestion/LinkPicker/suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 83f4127

Please sign in to comment.