Change data attr name

This commit is contained in:
Tanya Fomina 2022-04-05 02:26:33 +07:00
parent 8dd521e034
commit 8acc5b2a3c
3 changed files with 3 additions and 3 deletions

View file

@ -303,7 +303,7 @@ export default class Popover extends EventsDispatcher<PopoverEvent> {
private createItem(item: PopoverItem): HTMLElement {
const el = Dom.make('div', Popover.CSS.item);
el.setAttribute('data-tool', item.name);
el.setAttribute('data-item-name', item.name);
const label = Dom.make('div', Popover.CSS.itemLabel, {
innerHTML: item.label,
});

View file

@ -31,7 +31,7 @@ describe.only('Block ids', () => {
.click();
cy.get('[data-cy=editorjs]')
.get('div.ce-popover__item[data-tool=header]')
.get('div.ce-popover__item[data-item-name=header]')
.click();
cy.get('[data-cy=editorjs]')

View file

@ -104,7 +104,7 @@ describe('onChange callback', () => {
.click();
cy.get('[data-cy=editorjs]')
.get('div.ce-popover__item[data-tool=header]')
.get('div.ce-popover__item[data-item-name=header]')
.click();
cy.get('@onChange').should('be.calledTwice');