Skip to content

Commit

Permalink
refactor(lookup): Rename tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Oct 9, 2024
1 parent 9f1ffd2 commit c8f7061
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,7 @@ QUnit.module('popup options', {
assert.equal($overlay.is(':visible'), false, 'overlay is hidden');
});

QUnit.test('lookup popup should not be hidden after click outside was present', function(assert) {
QUnit.test('lookup popup should not be hidden after click outside was present if dropDownOptions.hideOnOutsideClick is set to false', function(assert) {
const $lookup = $('#lookupOptions');
const instance = $lookup.dxLookup({
'dropDownOptions.hideOnOutsideClick': false,
Expand Down Expand Up @@ -2206,7 +2206,7 @@ QUnit.module('popup options', {
const popup = usePopover ? PopoverFull.getInstance($overlay) : PopupFull.getInstance($overlay);
const { _loopFocus } = popup.option();

assert.equal(_loopFocus, !usePopover);
assert.strictEqual(_loopFocus, !usePopover, '_loopFocus is correct');
});
});

Expand Down Expand Up @@ -2950,7 +2950,7 @@ QUnit.module('keyboard navigation', {
assert.ok(instance.option('opened'), 'popup is opened');
});

QUnit.test('focus from first Popover element should move back to Lookup field while keeping Popup open when usePopover: true', function(assert) {
QUnit.test('focus from first Popover element should move back to Lookup field while keeping Popup open when usePopover: true and shift+Tab is pressed', function(assert) {
if(devices.real().deviceType !== 'desktop') {
assert.ok(true, 'test does not actual for mobile devices');
return;
Expand All @@ -2962,11 +2962,11 @@ QUnit.module('keyboard navigation', {
focusStateEnabled: true,
});
const instance = $element.dxLookup('instance');
const tabKeyDownEvent = $.Event('keydown', { key: 'Tab', shiftKey: true });
const shiftTabKeyDownEvent = $.Event('keydown', { key: 'Tab', shiftKey: true });
const $overlayContent = $(instance.content()).parent();
const $searchInput = $overlayContent.find(`.${LOOKUP_SEARCH_CLASS} .${TEXTEDITOR_INPUT_CLASS}`);

$searchInput.trigger(tabKeyDownEvent);
$searchInput.trigger(shiftTabKeyDownEvent);

assert.ok($element.hasClass(FOCUSED_CLASS), 'lookup field is focused');
assert.ok(instance.option('opened'), 'popup is opened');
Expand Down

0 comments on commit c8f7061

Please sign in to comment.