Skip to content

Commit

Permalink
update etalons
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeniyKiyashko committed Oct 10, 2024
1 parent 91e1fd4 commit a582895
Show file tree
Hide file tree
Showing 42 changed files with 77 additions and 53 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/testcafe_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,25 @@ jobs:
fail-fast: false
matrix:
ARGS: [
# { componentFolder: "accessibility", name: "accessibility (1/5)", indices: "1/5" },
# { componentFolder: "accessibility", name: "accessibility (2/5)", indices: "2/5" },
# { componentFolder: "accessibility", name: "accessibility (3/5)", indices: "3/5" },
# { componentFolder: "accessibility", name: "accessibility (4/5)", indices: "4/5" },
# { componentFolder: "accessibility", name: "accessibility (5/5)", indices: "5/5" },
# { componentFolder: "accessibility", name: "accessibility - material (1/7)", theme: "material.blue.light", indices: "1/7" },
# { componentFolder: "accessibility", name: "accessibility - material (2/7)", theme: "material.blue.light", indices: "2/7" },
# { componentFolder: "accessibility", name: "accessibility - material (3/7)", theme: "material.blue.light", indices: "3/7" },
# { componentFolder: "accessibility", name: "accessibility - material (4/7)", theme: "material.blue.light", indices: "4/7" },
# { componentFolder: "accessibility", name: "accessibility - material (5/7)", theme: "material.blue.light", indices: "5/7" },
# { componentFolder: "accessibility", name: "accessibility - material (6/7)", theme: "material.blue.light", indices: "6/7" },
# { componentFolder: "accessibility", name: "accessibility - material (7/7)", theme: "material.blue.light", indices: "7/7" },
# { componentFolder: "accessibility", name: "accessibility - fluent (1/7)", theme: "fluent.blue.light", indices: "1/7" },
# { componentFolder: "accessibility", name: "accessibility - fluent (2/7)", theme: "fluent.blue.light", indices: "2/7" },
# { componentFolder: "accessibility", name: "accessibility - fluent (3/7)", theme: "fluent.blue.light", indices: "3/7" },
# { componentFolder: "accessibility", name: "accessibility - fluent (4/7)", theme: "fluent.blue.light", indices: "4/7" },
# { componentFolder: "accessibility", name: "accessibility - fluent (5/7)", theme: "fluent.blue.light", indices: "5/7" },
# { componentFolder: "accessibility", name: "accessibility - fluent (6/7)", theme: "fluent.blue.light", indices: "6/7" },
# { componentFolder: "accessibility", name: "accessibility - fluent (7/7)", theme: "fluent.blue.light", indices: "7/7" },
{ componentFolder: "accessibility", name: "accessibility (1/5)", indices: "1/5" },
{ componentFolder: "accessibility", name: "accessibility (2/5)", indices: "2/5" },
{ componentFolder: "accessibility", name: "accessibility (3/5)", indices: "3/5" },
{ componentFolder: "accessibility", name: "accessibility (4/5)", indices: "4/5" },
{ componentFolder: "accessibility", name: "accessibility (5/5)", indices: "5/5" },
{ componentFolder: "accessibility", name: "accessibility - material (1/7)", theme: "material.blue.light", indices: "1/7" },
{ componentFolder: "accessibility", name: "accessibility - material (2/7)", theme: "material.blue.light", indices: "2/7" },
{ componentFolder: "accessibility", name: "accessibility - material (3/7)", theme: "material.blue.light", indices: "3/7" },
{ componentFolder: "accessibility", name: "accessibility - material (4/7)", theme: "material.blue.light", indices: "4/7" },
{ componentFolder: "accessibility", name: "accessibility - material (5/7)", theme: "material.blue.light", indices: "5/7" },
{ componentFolder: "accessibility", name: "accessibility - material (6/7)", theme: "material.blue.light", indices: "6/7" },
{ componentFolder: "accessibility", name: "accessibility - material (7/7)", theme: "material.blue.light", indices: "7/7" },
{ componentFolder: "accessibility", name: "accessibility - fluent (1/7)", theme: "fluent.blue.light", indices: "1/7" },
{ componentFolder: "accessibility", name: "accessibility - fluent (2/7)", theme: "fluent.blue.light", indices: "2/7" },
{ componentFolder: "accessibility", name: "accessibility - fluent (3/7)", theme: "fluent.blue.light", indices: "3/7" },
{ componentFolder: "accessibility", name: "accessibility - fluent (4/7)", theme: "fluent.blue.light", indices: "4/7" },
{ componentFolder: "accessibility", name: "accessibility - fluent (5/7)", theme: "fluent.blue.light", indices: "5/7" },
{ componentFolder: "accessibility", name: "accessibility - fluent (6/7)", theme: "fluent.blue.light", indices: "6/7" },
{ componentFolder: "accessibility", name: "accessibility - fluent (7/7)", theme: "fluent.blue.light", indices: "7/7" },
{ componentFolder: "common", name: "common" },
{ componentFolder: "common", name: "common - material", theme: 'material.blue.light' },
{ componentFolder: "common", name: "common - fluent", theme: 'fluent.blue.light' },
Expand Down
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 })();
}
};
36 changes: 20 additions & 16 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
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.
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/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
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.
10 changes: 5 additions & 5 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: 420px;');

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

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: 420px; padding-left: 100px;');

await t
.click(menu.getItem(2))
Expand Down Expand Up @@ -178,7 +178,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: 380px;');

await t
.click(menu.getItem(1))
Expand All @@ -187,14 +187,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: 380px; padding-left: 340px;');

await t
.click(menu.getItem(0))
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
10 changes: 10 additions & 0 deletions packages/testcafe-models/internal/dropDownList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ export default abstract class DropDownList extends TextBox {
dependencies: { getInstance },
})();
}

close(): Promise<void> {
const { getInstance } = this;

return ClientFunction(() => {
(getInstance() as any).close();
}, {
dependencies: { getInstance },
})();
}
}
8 changes: 5 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a582895

Please sign in to comment.