|
1 | 1 | import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; |
2 | 2 | import DateBox from 'devextreme-testcafe-models/dateBox'; |
| 3 | +import Guid from 'devextreme/core/guid'; |
3 | 4 | import { safeSizeTest } from '../../../helpers/safeSizeTest'; |
4 | 5 | import url from '../../../helpers/getPageUrl'; |
5 | 6 | import { createWidget } from '../../../helpers/createWidget'; |
6 | 7 | import { testScreenshot } from '../../../helpers/themeUtils'; |
| 8 | +import { appendElementTo } from '../../../helpers/domUtils'; |
7 | 9 |
|
8 | 10 | fixture.disablePageReloads`DateBox ValidationMessagePosition` |
9 | 11 | .page(url(__dirname, '../../container.html')); |
@@ -55,16 +57,21 @@ safeSizeTest('DateBox ValidationMessage position is correct', async (t) => { |
55 | 57 | await t |
56 | 58 | .expect(compareResults.isValid()) |
57 | 59 | .ok(compareResults.errorMessages()); |
58 | | -}, [600, 400]).before(async () => { |
| 60 | +}, [600, 400]).before(async (t) => { |
59 | 61 | // eslint-disable-next-line no-restricted-syntax |
60 | 62 | for (const position of positions) { |
| 63 | + const id = `${`dx${new Guid()}`}`; |
| 64 | + |
| 65 | + await appendElementTo('#container', 'div', id, {}); |
| 66 | + |
| 67 | + t.ctx.ids.push(id); |
61 | 68 | await createWidget('dxDateBox', { |
62 | 69 | elementAttr: { style: 'display: inline-block; margin: 50px 100px 0 0;' }, |
63 | 70 | width: 150, |
64 | 71 | height: 40, |
65 | 72 | validationMessageMode: 'always', |
66 | 73 | validationMessagePosition: position, |
67 | | - }); |
| 74 | + }, `#${id}`); |
68 | 75 | } |
69 | 76 |
|
70 | 77 | return createWidget('dxValidator', { |
|
0 commit comments