Skip to content

Commit 2d25a36

Browse files
committed
add test
1 parent faea683 commit 2d25a36

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

packages/devextreme/testing/tests/DevExpress.ui.widgets/menuBase.tests.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,5 +1360,22 @@ QUnit.module('Disabled item cursor style (T1327513)', () => {
13601360
const cursor = window.getComputedStyle($item.get(0)).cursor;
13611361
assert.strictEqual(cursor, 'default', 'items in disabled menu have default cursor');
13621362
});
1363-
});
13641363

1364+
QUnit.test('menu items with url should have correct cursor', function(assert) {
1365+
const menuBase = createMenu({
1366+
items: [
1367+
{ text: 'Item 1', url: 'https://example.com' },
1368+
{ text: 'Item 2', url: 'https://example.com/disabled', disabled: true },
1369+
],
1370+
});
1371+
1372+
const $enabledItem = menuBase.element.find(`.${DX_MENU_ITEM_CLASS}`).eq(0);
1373+
const enabledItemCursor = window.getComputedStyle($enabledItem.get(0)).cursor;
1374+
1375+
const $disabledItem = menuBase.element.find(`.${DX_MENU_ITEM_CLASS}`).eq(1);
1376+
const disabledItemCursor = window.getComputedStyle($disabledItem.get(0)).cursor;
1377+
1378+
assert.strictEqual(enabledItemCursor, 'pointer', 'enabled item with url has pointer cursor');
1379+
assert.strictEqual(disabledItemCursor, 'default', 'disabled item with url has default cursor');
1380+
});
1381+
});

0 commit comments

Comments
 (0)