Skip to content

Commit

Permalink
Button: no error should be raised when hovering if svg icon is used (…
Browse files Browse the repository at this point in the history
…T1266442)
  • Loading branch information
ksercs committed Dec 4, 2024
1 parent f4372d7 commit 27bcf04
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ QUnit.module('Button', function() {
assert.ok(this.element.hasClass(BUTTON_HAS_TEXT_CLASS, 'button with text has text class'));
});

QUnit.test('no error should be raised when hovering if svg icon is used (T1266442)', function(assert) {
this.instance.option('icon', '<svg></svg>');
try {
this.element.trigger('dxhoverstart');
} catch(e) {
assert.ok(false, `error is handled: ${e}`);
}

assert.ok(this.element.hasClass('dx-state-hover'), 'hovered class is added');
});

QUnit.test('onClick', function(assert) {
const clickHandler = sinon.spy();

Expand Down

0 comments on commit 27bcf04

Please sign in to comment.