Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestCafe: bump version to 3.6.2 #28161

Open
wants to merge 20 commits into
base: 24_2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
58c283f
TestCafe: bump version to 3.6.2
EugeniyKiyashko Oct 9, 2024
91e1fd4
set disableNativeAutomation to true
EugeniyKiyashko Oct 9, 2024
578cd28
update etalons
EugeniyKiyashko Oct 10, 2024
3e17fa6
update etalons
EugeniyKiyashko Oct 10, 2024
2cfb1de
update etalons
EugeniyKiyashko Oct 12, 2024
5f507e5
Merge branch '24_2' into 24_2_testcafe_bump
EugeniyKiyashko Oct 12, 2024
3264048
fix configuration
EugeniyKiyashko Oct 12, 2024
41e09c2
Uncomment dataGrid tests to check failures
ivanblinov2k17 Oct 15, 2024
4d3246b
Uncomment other grid squad tests and add skip-cache label
ivanblinov2k17 Oct 15, 2024
5510cb3
Merge branch '24_2' into 24_2_testcafe_bump
ivanblinov2k17 Oct 22, 2024
9dbad83
Stabilization of tests: Set DataGrid' width for sticky column tests
Oct 22, 2024
0f6c033
Merge branch '24_2' into 24_2_testcafe_bump
ivanblinov2k17 Oct 24, 2024
bcff660
Try waiting for dataGrid isReady for grid keyboardNavigation tests (T…
ivanblinov2k17 Oct 24, 2024
b9149ae
Grid KeyboardNavigation - try more datagrid.isReady in defferent places
ivanblinov2k17 Oct 30, 2024
ef9c068
Merge branch '24_2' into 24_2_testcafe_bump
ivanblinov2k17 Oct 30, 2024
2749d08
Update datagrid screenshots/masks
ivanblinov2k17 Oct 31, 2024
6501861
Update etalons for chat after merge
ivanblinov2k17 Oct 31, 2024
f452b58
DataGrid update etalons/masks part 2
ivanblinov2k17 Oct 31, 2024
de29b77
DataGrid - update masks part 3
ivanblinov2k17 Nov 1, 2024
bb84c00
Datagrid - update etalon/masks part 4
ivanblinov2k17 Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/testcafe-devextreme/helpers/clearPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const testCafe = require('testcafe');

module.exports = {
clearTestPage: async function() {
clearTestPage: async function(t) {
const shadowDom = process.env.shadowDom === 'true';

await testCafe.ClientFunction(() => {
Expand Down Expand Up @@ -46,6 +46,6 @@ module.exports = {
dependencies: {
shadowDom,
}
})();
}).with({ boundTestRun: t })();
}
};
2 changes: 1 addition & 1 deletion e2e/testcafe-devextreme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"minimist": "1.2.8",
"mockdate": "3.0.5",
"nconf": "0.12.1",
"testcafe": "2.5.0"
"testcafe": "3.6.2"
}
}
38 changes: 21 additions & 17 deletions e2e/testcafe-devextreme/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,28 @@ createTestCafe({
quarantineMode: { successThreshold: 1, attemptLimit: 5 },
};

if(args.componentFolder.trim() !== 'renovation') {
runOptions.hooks = {
test: {
before: async() => {
if(args.shadowDom) {
await addShadowRootTree();
}

if(args.theme) {
await changeTheme(args.theme);
}
},
after: async() => {
await testPageUtils.clearTestPage();
runOptions.hooks = {
test: {
before: async() => {
if(args.shadowDom) {
await addShadowRootTree();
}

if(args.theme) {
await changeTheme(args.theme);
}
},
};
}
after: async(t) => {
await testPageUtils.clearTestPage(t);

await createTestCafe.ClientFunction(() => {
document.body.style.minHeight = '100px';
}).with({ boundTestRun: t })();

await t.click(createTestCafe.Selector('body'), { offsetX: -1, offsetY: 1 });
}
},
};

if(args.browsers === 'chrome:docker') {
runOptions.disableScreenshots = true;
Expand Down Expand Up @@ -158,7 +162,7 @@ function setShadowDom(args) {
function expandBrowserAlias(browser) {
switch(browser) {
case 'chrome:devextreme-shr2':
return 'chrome:headless --disable-gpu --window-size=1200,800';
return 'chrome --headless=old --disable-gpu --window-size=1200,800';
case 'chrome:docker':
return 'chromium:headless --no-sandbox --disable-gpu --window-size=1200,800';
}
Expand Down
18 changes: 13 additions & 5 deletions e2e/testcafe-devextreme/tests/accessibility/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import url from '../../helpers/getPageUrl';
import { testAccessibility, Configuration } from '../../helpers/accessibility/test';
import { Options } from '../../helpers/generateOptionMatrix';

fixture.disablePageReloads`Accessibility`
.page(url(__dirname, '../container.html'));
fixture`Accessibility`
.page(url(__dirname, '../container.html'))
// avoid `sj_evt is not defined` error
.skipJsErrors();

const markersData = [
{ location: '40.7825, -73.966111' },
Expand All @@ -18,21 +20,27 @@ const options: Options<Properties> = {
apiKey: [{
bing: 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC',
}],
hint: [undefined, 'hint'],
controls: [true, false],
zoom: [undefined, 10],
markers: [markersData],
};

const a11yCheckConfig = {
// NOTE: color-contrast issues
rules: { 'color-contrast': { enabled: false } },
rules: {
'color-contrast': { enabled: false },
'aria-command-name': { enabled: false },
},
};

const created = async (t: TestController): Promise<void> => {
await t.wait(3000);
};

const configuration: Configuration = {
component: 'dxMap',
a11yCheckConfig,
options,
created,
};

testAccessibility(configuration);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified e2e/testcafe-devextreme/tests/dataGrid/etalons/pager-compact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2166,6 +2166,7 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => {
const dataGrid = new DataGrid('#container');
const headers = dataGrid.getHeaders();
const dataGridOffsetBottom = await dataGrid.element.getBoundingClientRectProperty('bottom');
await t.expect(dataGrid.isReady()).ok();

async function checkNavigationOfAllCells(): Promise<void> {
await t
Expand Down Expand Up @@ -2248,6 +2249,7 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => {
test(`The cell focus should be restored on pressing shift and tab keys when command column is ${isCommandColumnFixed ? 'fixed' : 'unfixed'} and on the left side (T951849)`, async (t) => {
const dataGrid = new DataGrid('#container');
const headers = dataGrid.getHeaders();
await t.expect(dataGrid.isReady()).ok();

async function checkNavigationOfAllCells(): Promise<void> {
await t
Expand Down Expand Up @@ -2329,6 +2331,7 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => {
const dataGrid = new DataGrid('#container');
const headers = dataGrid.getHeaders();
const dataGridOffsetBottom = await dataGrid.element.getBoundingClientRectProperty('bottom');
await t.expect(dataGrid.isReady()).ok();

async function checkNavigationOfAllCells(): Promise<void> {
await t
Expand Down Expand Up @@ -2412,6 +2415,7 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => {

test(`The first cell should be focused on pressing shift and tab keys after clicking on the document when command column is ${isCommandColumnFixed ? 'fixed' : 'unfixed'} and on the right side (T951849)`, async (t) => {
const dataGrid = new DataGrid('#container');
await t.expect(dataGrid.isReady()).ok();
const headers = dataGrid.getHeaders();
const dataGridOffsetBottom = await dataGrid.element.getBoundingClientRectProperty('bottom');

Expand Down Expand Up @@ -2447,14 +2451,15 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => {
}

await checkNavigationOfAllCells();
await t.expect(dataGrid.isReady()).ok();

await t
.click(Selector('body'), {
offsetY: dataGridOffsetBottom + 10,
})
.pressKey('shift+tab')
.expect(dataGrid.getDataCell(0, 0).element.focused)
.ok();
.expect(dataGrid.isReady()).ok()
.expect(dataGrid.getDataCell(0, 0).element.focused).ok();
}).before(async () => {
await createWidget('dxDataGrid', {
dataSource: [
Expand All @@ -2481,6 +2486,7 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => {
test(`The cell focus should be restored on pressing shift and tab keys when command column is ${isCommandColumnFixed ? 'fixed' : 'unfixed'} and on the right side (T951849)`, async (t) => {
const dataGrid = new DataGrid('#container');
const headers = dataGrid.getHeaders();
await t.expect(dataGrid.isReady()).ok();

async function checkNavigationOfAllCells(): Promise<void> {
await t
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions e2e/testcafe-devextreme/tests/dataGrid/tagBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ fixture.disablePageReloads`Tagbox Columns`.page(
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
await t
.click(dataGrid.getDataCell(0, 1).element)
.expect(dataGrid.isReady())
.ok()
.expect(
await takeScreenshot(
`T1228720-grid-tagbox-on-edit_(${theme}).png`,
Expand Down
41 changes: 26 additions & 15 deletions e2e/testcafe-devextreme/tests/editors/dateRangeBox/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Selector } from 'testcafe';
import DateRangeBox from 'devextreme-testcafe-models/dateRangeBox';
import url from '../../../helpers/getPageUrl';
import { createWidget } from '../../../helpers/createWidget';
import { appendElementTo } from '../../../helpers/domUtils';
import { appendElementTo, insertStylesheetRulesToPage } from '../../../helpers/domUtils';

fixture.disablePageReloads`DateRangeBox keyboard navigation`
.page(url(__dirname, '../../container.html'));
Expand Down Expand Up @@ -1250,10 +1250,10 @@ test('DateRangeBox keyboard navigation via `shift+tab` key if applyValueMode is
});

test('DateRangeBox should not be closed by press shift+tab key on endDate input', async (t) => {
const dateRangeBox = new DateRangeBox('#container');
const dateRangeBox = new DateRangeBox('#dateRangeBox');

await t
.click(Selector('body'), { offsetX: -50 })
.click(Selector('#nextFocusableElement'))
.pressKey('shift+tab');

await t
Expand All @@ -1279,18 +1279,29 @@ test('DateRangeBox should not be closed by press shift+tab key on endDate input'
.eql(false)
.expect(dateRangeBox.isFocused)
.notOk();
}).before(async () => createWidget('dxDateRangeBox', {
value: ['2021/09/17', '2021/10/24'],
openOnFieldClick: true,
opened: true,
width: 500,
dropDownOptions: {
hideOnOutsideClick: false,
},
calendarOptions: {
focusStateEnabled: false,
},
}));
}).before(async () => {
await insertStylesheetRulesToPage('#container { display: flex; }');

await appendElementTo('#container', 'div', 'dateRangeBox');
await appendElementTo('#container', 'div', 'nextFocusableElement');

await createWidget('dxDateRangeBox', {
value: ['2021/09/17', '2021/10/24'],
openOnFieldClick: true,
opened: true,
width: 500,
dropDownOptions: {
hideOnOutsideClick: false,
},
calendarOptions: {
focusStateEnabled: false,
},
}, '#dateRangeBox');

await createWidget('dxButton', {
text: 'Next Focusable Element',
}, '#nextFocusableElement');
});

[
{ key: 'left', offsetInDays: -1 },
Expand Down
2 changes: 2 additions & 0 deletions e2e/testcafe-devextreme/tests/editors/lookup/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ test('Popup should not be closed if lookup is placed at the page bottom (T101803
await t
.expect(await lookup.isOpened())
.ok();

await lookup.close();
}).before(async () => createWidget('dxLookup', {
items: [1, 2, 3],
usePopover: false,
Expand Down
33 changes: 27 additions & 6 deletions e2e/testcafe-devextreme/tests/navigation/menu/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ safeSizeTest('Menu delimiter appearance when orientation is horizontal', async (

await testScreenshot(t, takeScreenshot, 'Delimiter, horizontal menu, submenu less than root item.png');

await setAttribute('#container', 'style', 'padding-top: 450px;');
await setAttribute('#container', 'style', 'padding-top: 430px;');

await t
.click(menu.getItem(1))
Expand All @@ -117,15 +117,15 @@ safeSizeTest('Menu delimiter appearance when orientation is horizontal', async (

await testScreenshot(t, takeScreenshot, 'Delimiter, horizontal menu, submenu less than root item, bottom collision.png');

await setAttribute('#container', 'style', 'padding-left: 100px;');
await setAttribute('#container', 'style', 'padding-left: 80px;');

await t
.click(menu.getItem(3))
.pressKey('down');

await testScreenshot(t, takeScreenshot, 'Delimiter, horizontal menu, right collision.png');

await setAttribute('#container', 'style', 'padding-top: 450px; padding-left: 100px;');
await setAttribute('#container', 'style', 'padding-top: 400px; padding-left: 80px;');

await t
.click(menu.getItem(2))
Expand All @@ -147,6 +147,9 @@ safeSizeTest('Menu delimiter appearance when orientation is horizontal', async (
}, {
id: '2_2',
text: 'SuperLED 42',
}, {
id: '2_2',
text: 'SuperLED 60',
}],
}, {
text: 'Monitors',
Expand All @@ -162,6 +165,12 @@ safeSizeTest('Menu delimiter appearance when orientation is horizontal', async (
items: [{
id: '4_1',
text: 'Projector Plus',
}, {
id: '4_2',
text: 'Projector PlusHD',
}, {
id: '4_3',
text: 'Projector & Screens',
}],
}] as Item[];

Expand All @@ -178,7 +187,7 @@ safeSizeTest('Menu delimiter appearance when orientation is vertical', async (t)

await testScreenshot(t, takeScreenshot, 'Delimiter appearance, orientation is vertical.png');

await setAttribute('#container', 'style', 'padding-top: 400px;');
await setAttribute('#container', 'style', 'padding-top: 300px;');

await t
.click(menu.getItem(1))
Expand All @@ -187,14 +196,14 @@ safeSizeTest('Menu delimiter appearance when orientation is vertical', async (t)

await testScreenshot(t, takeScreenshot, 'Delimiter appearance, orientation is vertical, bottom collision.png');

await setAttribute('#container', 'style', 'padding-top: 0px; padding-left: 350px;');
await setAttribute('#container', 'style', 'padding-top: 0px; padding-left: 340px;');

await t
.click(menu.getItem(2));

await testScreenshot(t, takeScreenshot, 'Delimiter appearance, orientation is vertical, right collision.png');

await setAttribute('#container', 'style', 'padding-top: 400px; padding-left: 350px;');
await setAttribute('#container', 'style', 'padding-top: 300px; padding-left: 300px;');

await t
.click(menu.getItem(0))
Expand All @@ -216,6 +225,18 @@ safeSizeTest('Menu delimiter appearance when orientation is vertical', async (t)
}, {
id: '2_2',
text: 'SuperLED 42',
}, {
id: '2_3',
text: 'SuperLED 60',
}, {
id: '2_4',
text: 'SuperLED 72',
}, {
id: '2_5',
text: 'SuperLED 80',
}, {
id: '2_6',
text: 'SuperLED 91',
}],
}, {
text: 'Monitors',
Expand Down
3 changes: 0 additions & 3 deletions e2e/testcafe-devextreme/tests/navigation/splitter/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Selector } from 'testcafe';
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer';
import Splitter from 'devextreme-testcafe-models/splitter';
import url from '../../../helpers/getPageUrl';
Expand Down Expand Up @@ -37,8 +36,6 @@ fixture.disablePageReloads`Splitter_common`
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const splitter = new Splitter('#container');

await t.click(Selector('body'), { offsetX: -50 });

await testScreenshot(t, takeScreenshot, getScreenshotName('normal'), { element: '#container' });
await testScreenshot(t, takeScreenshot, getScreenshotName('normal'), { element: '#container', theme: darkTheme });

Expand Down
4 changes: 1 addition & 3 deletions e2e/testcafe-devextreme/tests/navigation/splitter/resize.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import Splitter from 'devextreme-testcafe-models/splitter';
import url from '../../../helpers/getPageUrl';
import { createWidget } from '../../../helpers/createWidget';
import { clearTestPage } from '../../../helpers/clearPage';
import { safeSizeTest } from '../../../helpers/safeSizeTest';

fixture.disablePageReloads`Splitter_integration`
.page(url(__dirname, '../../container.html'))
.afterEach(async () => clearTestPage());
.page(url(__dirname, '../../container.html'));

safeSizeTest('non resizable pane should not change its size during resize', async (t) => {
const splitter = new Splitter('#container');
Expand Down
Loading
Loading