Skip to content

Commit a4e0fc3

Browse files
author
Julia Volkova
committed
fixed lookup, tagbox, floatingAction Button
1 parent 9943587 commit a4e0fc3

3 files changed

Lines changed: 31 additions & 21 deletions

File tree

e2e/testcafe-devextreme/tests/editors/button/floatingAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ for (const label of ['Add Row', '']) {
7777
.expect(compareResults.isValid())
7878
.ok(compareResults.errorMessages());
7979
}).before(async () => {
80-
await setStyleAttribute(Selector('#container'), 'width: 300px; height: 300px;');
80+
await setStyleAttribute(Selector('#container'), 'width: 300px; height: 300px; font-family: sans-serif !important;');
8181
await appendElementTo('#container', 'div', 'speed-dial-action');
8282

8383
await setGlobalConfig();

e2e/testcafe-devextreme/tests/editors/lookup/common.ts

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from '../../../helpers/domUtils';
1313

1414
const LOOKUP_FIELD_CLASS = 'dx-lookup-field';
15+
const OVERLAY_CLASS = 'dx-overlay-content';
1516

1617
const stylingModes = ['outlined', 'underlined', 'filled'];
1718
const labelModes = ['static', 'floating', 'hidden', 'outside'];
@@ -89,37 +90,47 @@ if (!isMaterialBased()) {
8990
safeSizeTest('Check popup height with no found data option', async (t) => {
9091
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
9192
await t.click(Selector(`.${LOOKUP_FIELD_CLASS}`));
93+
await t.hover(`.${OVERLAY_CLASS}`);
9294

9395
await testScreenshot(t, takeScreenshot, 'Lookup with no found data.png');
9496

9597
await t
9698
.expect(compareResults.isValid())
9799
.ok(compareResults.errorMessages());
98-
}, [300, 400]).before(async () => createWidget('dxLookup', { dataSource: [], searchEnabled: true }));
100+
}, [300, 400]).before(async () => {
101+
await insertStylesheetRulesToPage('* { caret-color: transparent !important; }');
102+
103+
return createWidget('dxLookup', { dataSource: [], searchEnabled: true });
104+
});
99105

100106
safeSizeTest('Check popup height in loading state', async (t) => {
101107
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
102108

103109
await t.click(Selector(`.${LOOKUP_FIELD_CLASS}`));
110+
await t.hover(`.${OVERLAY_CLASS}`);
104111

105112
await testScreenshot(t, takeScreenshot, 'Lookup in loading.png');
106113

107114
await t
108115
.expect(compareResults.isValid())
109116
.ok(compareResults.errorMessages());
110-
}, [300, 400]).before(async () => createWidget('dxLookup', {
111-
dataSource: {
112-
load() {
113-
return new Promise((resolve) => {
114-
setTimeout(() => {
115-
resolve([1, 2, 3]);
116-
}, 5000);
117-
});
117+
}, [300, 400]).before(async () => {
118+
await insertStylesheetRulesToPage('* { caret-color: transparent !important; }');
119+
120+
return createWidget('dxLookup', {
121+
dataSource: {
122+
load() {
123+
return new Promise((resolve) => {
124+
setTimeout(() => {
125+
resolve([1, 2, 3]);
126+
}, 5000);
127+
});
128+
},
118129
},
119-
},
120-
valueExpr: 'id',
121-
displayExpr: 'text',
122-
}));
130+
valueExpr: 'id',
131+
displayExpr: 'text',
132+
});
133+
});
123134

124135
test('Placeholder is visible after items option change when value is not chosen (T1099804)', async (t) => {
125136
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

e2e/testcafe-devextreme/tests/editors/tagBox/label.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import { Selector } from 'testcafe';
22
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer';
33
import TagBox from 'devextreme-testcafe-models/tagBox';
44
import { safeSizeTest } from '../../../helpers/safeSizeTest';
5-
import { testScreenshot } from '../../../helpers/themeUtils';
5+
import { isMaterial, testScreenshot } from '../../../helpers/themeUtils';
66
import url from '../../../helpers/getPageUrl';
77
import { createWidget } from '../../../helpers/createWidget';
88
import {
99
appendElementTo,
1010
setStyleAttribute,
11+
insertStylesheetRulesToPage,
1112
} from '../../../helpers/domUtils';
1213

1314
const stylingModes = ['outlined', 'underlined', 'filled'];
@@ -37,6 +38,10 @@ stylingModes.forEach((stylingMode) => {
3738
stylingMode,
3839
};
3940

41+
if (isMaterial()) {
42+
await insertStylesheetRulesToPage('#container .dx-widget { font-family: sans-serif }');
43+
}
44+
4045
await appendElementTo('#container', 'div', 'tagBox1', { });
4146
await appendElementTo('#container', 'div', 'tagBox2', { });
4247

@@ -61,12 +66,6 @@ stylingModes.forEach((stylingMode) => {
6166

6267
const screenshotName = `TagBox label with stylingMode=${stylingMode},labelMode=${labelMode}.png`;
6368

64-
await testScreenshot(t, takeScreenshot, screenshotName);
65-
66-
await t
67-
.expect(compareResults.isValid())
68-
.ok(compareResults.errorMessages());
69-
7069
await t.click(tagBox.element);
7170
await t.click(tagBox.element);
7271

0 commit comments

Comments
 (0)