Skip to content

Commit

Permalink
try to emulate through kbn
Browse files Browse the repository at this point in the history
  • Loading branch information
ksercs committed Dec 5, 2024
1 parent 31af7e5 commit f4aa804
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions apps/demos/testing/widgets/tagbox/GroupedItems.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer';
import { Selector as $ } from 'testcafe';
import { runManualTest } from '../../../utils/visual-tests/matrix-test-helper';
import { testScreenshot } from '../../../utils/visual-tests/helpers/theme-utils';

Expand All @@ -11,33 +10,29 @@ fixture('TagBox.GroupedItems')

runManualTest('TagBox', 'GroupedItems', ['jQuery', 'React', 'Vue', 'Angular'], (test) => {
test('GroupedItems', async (t) => {
const TAG_BOX_CLASS = 'dx-tagbox';
const $tagBoxes = $(`.${TAG_BOX_CLASS} .dx-tag-container`);
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

await t
.click($tagBoxes.nth(0))
.wait(200);
.pressKey('tab')
.pressKey('alt down');

await testScreenshot(t, takeScreenshot, 'tagbox_groupeditems_first_opened.png');

await t
.click($tagBoxes.nth(0))
.wait(200);
.pressKey('esc')

await t
.click($tagBoxes.nth(1))
.wait(200);
.pressKey('tab')
.pressKey('alt down');

await testScreenshot(t, takeScreenshot, 'tagbox_groupeditems_second_opened.png');

await t
.click($tagBoxes.nth(1))
.wait(200);
.pressKey('esc')

await t
.click($tagBoxes.nth(2))
.wait(200);
.pressKey('tab')
.pressKey('alt down');

await testScreenshot(t, takeScreenshot, 'tagbox_groupeditems_third_opened.png');

Expand Down

0 comments on commit f4aa804

Please sign in to comment.