Skip to content

Commit cffc81a

Browse files
update etalons
1 parent 3001e8f commit cffc81a

59 files changed

Lines changed: 1208 additions & 1702 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

e2e/testcafe-devextreme/runner.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,13 @@ createTestCafe(TESTCAFE_CONFIG)
255255
test: {
256256
before: async (t: TestController) => {
257257
if (!componentFolder.includes('accessibility')) {
258-
await t.eval(() => {
258+
await ClientFunction(() => {
259259
if (document.activeElement && document.activeElement !== document.body) {
260260
(document.activeElement as HTMLElement).blur();
261261
}
262262

263263
window.getSelection()?.removeAllRanges();
264-
});
264+
}).with({ boundTestRun: t })();
265265

266266
await t.hover('html');
267267

@@ -285,12 +285,6 @@ createTestCafe(TESTCAFE_CONFIG)
285285
}
286286
},
287287
after: async (t: TestController) => {
288-
await ClientFunction(() => {
289-
const { localization } = (window as any).DevExpress;
290-
291-
localization.locale('en');
292-
}).with({ boundTestRun: t })();
293-
294288
await clearTestPage(t);
295289
},
296290
},

e2e/testcafe-devextreme/tests/accessibility/cardView/sortable.ts

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -34,87 +34,87 @@ const getDragCoordinates = async (
3434

3535
const dragDirectionX = direction === 'left' ? -1 : 1;
3636
const dragOffsetX = Math
37-
.round(dragDirectionX * DRAG_MOVE_X_COEFFICIENT * itemWidth);
37+
.round(dragDirectionX * DRAG_MOVE_X_COEFFICIENT * itemWidth);
3838
const dragOffsetY = Math
3939
.round(DRAG_MOVE_Y_COEFFICIENT * itemHeight);
4040

4141
return { dragOffsetX, dragOffsetY };
4242
};
4343

44-
test('sortable indicator during dragging to first place', async (t) => {
45-
const cardView = new CardView(CARD_VIEW_SELECTOR);
46-
47-
const headerPanel = cardView.getHeaderPanel();
48-
const item = headerPanel.getHeaderItem(1);
49-
50-
const {
51-
dragOffsetX,
52-
dragOffsetY,
53-
} = await getDragCoordinates(item.element, 'left');
54-
await t.drag(item.element, dragOffsetX, dragOffsetY);
55-
56-
await a11yCheck(t, a11yCheckConfig);
57-
}).before(async () => {
58-
await insertStylesheetRulesToPage(PARENT_STYLES);
59-
await MouseUpEvents.disable(MouseAction.dragToOffset);
60-
await createWidget('dxCardView', {
61-
columns: ['Field A', 'Field B', 'Field C'],
62-
allowColumnReordering: true,
63-
width: 360,
64-
});
65-
}).after(async () => {
66-
await removeStylesheetRulesFromPage();
67-
await MouseUpEvents.enable(MouseAction.dragToOffset);
44+
test('sortable indicator during dragging to first place', async (t) => {
45+
const cardView = new CardView(CARD_VIEW_SELECTOR);
46+
47+
const headerPanel = cardView.getHeaderPanel();
48+
const item = headerPanel.getHeaderItem(1);
49+
50+
const {
51+
dragOffsetX,
52+
dragOffsetY,
53+
} = await getDragCoordinates(item.element, 'left');
54+
await t.drag(item.element, dragOffsetX, dragOffsetY);
55+
56+
await a11yCheck(t, a11yCheckConfig);
57+
}).before(async () => {
58+
await insertStylesheetRulesToPage(PARENT_STYLES);
59+
await MouseUpEvents.disable(MouseAction.dragToOffset);
60+
await createWidget('dxCardView', {
61+
columns: ['Field A', 'Field B', 'Field C'],
62+
allowColumnReordering: true,
63+
width: 360,
6864
});
69-
70-
test('sortable indicator during dragging to middle place', async (t) => {
71-
const cardView = new CardView(CARD_VIEW_SELECTOR);
72-
73-
const headerPanel = cardView.getHeaderPanel();
74-
const item = headerPanel.getHeaderItem(0);
75-
76-
const {
77-
dragOffsetX,
78-
dragOffsetY,
79-
} = await getDragCoordinates(item.element, 'right');
80-
await t.drag(item.element, dragOffsetX, dragOffsetY);
81-
82-
await a11yCheck(t, a11yCheckConfig);
83-
}).before(async () => {
84-
await insertStylesheetRulesToPage(PARENT_STYLES);
85-
await MouseUpEvents.disable(MouseAction.dragToOffset);
86-
await createWidget('dxCardView', {
87-
columns: ['Field A', 'Field B', 'Field C'],
88-
allowColumnReordering: true,
89-
width: 360,
90-
});
91-
}).after(async () => {
92-
await removeStylesheetRulesFromPage();
93-
await MouseUpEvents.enable(MouseAction.dragToOffset);
65+
}).after(async () => {
66+
await removeStylesheetRulesFromPage();
67+
await MouseUpEvents.enable(MouseAction.dragToOffset);
68+
});
69+
70+
test('sortable indicator during dragging to middle place', async (t) => {
71+
const cardView = new CardView(CARD_VIEW_SELECTOR);
72+
73+
const headerPanel = cardView.getHeaderPanel();
74+
const item = headerPanel.getHeaderItem(0);
75+
76+
const {
77+
dragOffsetX,
78+
dragOffsetY,
79+
} = await getDragCoordinates(item.element, 'right');
80+
await t.drag(item.element, dragOffsetX, dragOffsetY);
81+
82+
await a11yCheck(t, a11yCheckConfig);
83+
}).before(async () => {
84+
await insertStylesheetRulesToPage(PARENT_STYLES);
85+
await MouseUpEvents.disable(MouseAction.dragToOffset);
86+
await createWidget('dxCardView', {
87+
columns: ['Field A', 'Field B', 'Field C'],
88+
allowColumnReordering: true,
89+
width: 360,
9490
});
95-
96-
test('sortable indicator during dragging to last place', async (t) => {
97-
const cardView = new CardView(CARD_VIEW_SELECTOR);
98-
99-
const headerPanel = cardView.getHeaderPanel();
100-
const item = headerPanel.getHeaderItem(1);
101-
102-
const {
103-
dragOffsetX,
104-
dragOffsetY,
105-
} = await getDragCoordinates(item.element, 'right');
106-
await t.drag(item.element, dragOffsetX, dragOffsetY);
107-
108-
await a11yCheck(t, a11yCheckConfig);
109-
}).before(async () => {
110-
await insertStylesheetRulesToPage(PARENT_STYLES);
111-
await MouseUpEvents.disable(MouseAction.dragToOffset);
112-
await createWidget('dxCardView', {
113-
columns: ['Field A', 'Field B', 'Field C'],
114-
allowColumnReordering: true,
115-
width: 360,
116-
});
117-
}).after(async () => {
118-
await removeStylesheetRulesFromPage();
119-
await MouseUpEvents.enable(MouseAction.dragToOffset);
91+
}).after(async () => {
92+
await removeStylesheetRulesFromPage();
93+
await MouseUpEvents.enable(MouseAction.dragToOffset);
94+
});
95+
96+
test('sortable indicator during dragging to last place', async (t) => {
97+
const cardView = new CardView(CARD_VIEW_SELECTOR);
98+
99+
const headerPanel = cardView.getHeaderPanel();
100+
const item = headerPanel.getHeaderItem(1);
101+
102+
const {
103+
dragOffsetX,
104+
dragOffsetY,
105+
} = await getDragCoordinates(item.element, 'right');
106+
await t.drag(item.element, dragOffsetX, dragOffsetY);
107+
108+
await a11yCheck(t, a11yCheckConfig);
109+
}).before(async () => {
110+
await insertStylesheetRulesToPage(PARENT_STYLES);
111+
await MouseUpEvents.disable(MouseAction.dragToOffset);
112+
await createWidget('dxCardView', {
113+
columns: ['Field A', 'Field B', 'Field C'],
114+
allowColumnReordering: true,
115+
width: 360,
120116
});
117+
}).after(async () => {
118+
await removeStylesheetRulesFromPage();
119+
await MouseUpEvents.enable(MouseAction.dragToOffset);
120+
});

0 commit comments

Comments
 (0)