mirror of
https://github.com/codex-team/editor.js
synced 2026-03-18 00:19:53 +01:00
* deps: upgrade cypress and related libraries * chore: automate migrate cypress config, rename spec files * fix: custom commands types * chore: upgrade CHANGELOG.md * ci: upgrade cypress action to support new config file format * ci: remove container from firefox job, upgrade checkout action
33 lines
728 B
TypeScript
33 lines
728 B
TypeScript
describe('Inline Tool Link', () => {
|
|
it('should create a link by Enter keydown in input', () => {
|
|
cy.createEditor({
|
|
data: {
|
|
blocks: [
|
|
{
|
|
type: 'paragraph',
|
|
data: {
|
|
text: 'First block text',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|
|
|
|
cy.get('[data-cy=editorjs]')
|
|
.find('div.ce-block')
|
|
.click()
|
|
.type('{selectall}')
|
|
.type('{ctrl}K');
|
|
|
|
cy.get('[data-cy=editorjs]')
|
|
.find('.ce-inline-tool-input')
|
|
.click()
|
|
.type('https://codex.so')
|
|
.type('{enter}');
|
|
|
|
cy.get('[data-cy=editorjs]')
|
|
.find('div.ce-block')
|
|
.find('a')
|
|
.should('have.attr', 'href', 'https://codex.so');
|
|
});
|
|
});
|