mirror of
https://github.com/codex-team/editor.js
synced 2024-05-03 15:13:22 +02:00
b1b582b150
* chore(icons): migrating to the coded icon pack * conversion toolbar * inline toolbar, part 1 * inline-link tool has the new icons * added a test for creating a link by Enter keydown in link input * rm last icons, svg sprite, loaders * rollback .ce-settings styles * Update CHANGELOG.md * Update settings.json
34 lines
728 B
TypeScript
34 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');
|
|
});
|
|
});
|