Skip to content

Conversation

@EugeniyKiyashko
Copy link
Contributor

No description provided.

@EugeniyKiyashko EugeniyKiyashko self-assigned this Oct 16, 2025
@EugeniyKiyashko EugeniyKiyashko requested review from a team as code owners October 16, 2025 19:59
@EugeniyKiyashko EugeniyKiyashko force-pushed the 25_2_split_a11y_tests_speedup branch 6 times, most recently from 4c27b16 to 6a3cd89 Compare October 17, 2025 11:34
@EugeniyKiyashko EugeniyKiyashko changed the title e2e tests: move Gantt, FilterBuilder, Pagination to common folder e2e tests: move Gantt, FilterBuilder, Pagination, TreeList to common folder Oct 17, 2025
@EugeniyKiyashko EugeniyKiyashko force-pushed the 25_2_split_a11y_tests_speedup branch 2 times, most recently from 679aefd to d7d08a3 Compare October 17, 2025 17:45
@EugeniyKiyashko EugeniyKiyashko changed the title e2e tests: move Gantt, FilterBuilder, Pagination, TreeList to common folder e2e tests: move Gantt, FilterBuilder, Pagination to common folder Oct 17, 2025
@EugeniyKiyashko EugeniyKiyashko force-pushed the 25_2_split_a11y_tests_speedup branch 2 times, most recently from b938314 to bfff62b Compare October 20, 2025 15:14
@Copilot Copilot AI review requested due to automatic review settings October 20, 2025 15:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reorganizes the e2e test infrastructure by moving Gantt, FilterBuilder, and Pagination tests to a common folder structure, and implements dynamic script loading to optimize test execution. The changes include relocating test files, updating import paths, and introducing conditional loading of external dependencies (Quill, Gantt, ASP.NET Data) based on test metadata.

Reviewed Changes

Copilot reviewed 44 out of 159 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
packages/testcafe-models/dataGrid/index.ts Updated scrollBy method signature to require TestController parameter and add scrollable check
e2e/testcafe-devextreme/tests/scheduler/common/grouping/groupHeaderLongNamesCss.ts Added debugging console.log statements to output page HTML
e2e/testcafe-devextreme/tests/scheduler/common/api/resourceRequestCount.ts Added loadAspNetData metadata to tests requiring ASP.NET data
e2e/testcafe-devextreme/tests/scheduler/common/agenda/keyField.ts Added loadAspNetData metadata to tests requiring ASP.NET data
e2e/testcafe-devextreme/tests/editors/selectBox/common.ts Added loadAspNetData metadata to test requiring ASP.NET data
e2e/testcafe-devextreme/tests/editors/htmlEditor/*.ts Added loadQuill metadata to tests requiring Quill library
e2e/testcafe-devextreme/tests/editors/chat/messageList.ts Added loadAspNetData metadata to test requiring ASP.NET data
e2e/testcafe-devextreme/tests/dataGrid/**/*.ts Updated all scrollBy calls to include TestController parameter, added loadAspNetData metadata where needed
e2e/testcafe-devextreme/tests/container.html Commented out static script loading for dx-quill, dx-gantt, dx.all, and dx.aspnet.data
e2e/testcafe-devextreme/tests/common/pagination/*.ts Moved from tests/pagination/ and updated import paths
e2e/testcafe-devextreme/tests/common/gantt/*.ts Moved from tests/gantt/ and updated import paths, added loadGantt metadata
e2e/testcafe-devextreme/tests/common/filterBuilder/*.ts Moved from tests/filterBuilder/ and updated import paths
e2e/testcafe-devextreme/tests/cardView/headerFilter/remote.functional.ts Added loadAspNetData metadata to tests requiring ASP.NET data
e2e/testcafe-devextreme/tests/accessibility/*.ts Added loadQuill metadata and updated import paths
e2e/testcafe-devextreme/runner.ts Implemented dynamic script loading logic based on test metadata, added debugging logs, commented out retry logic
e2e/testcafe-devextreme/helpers/themeUtils.ts Refactored screenshot naming logic for better clarity
e2e/testcafe-devextreme/helpers/testPageUtils.ts Added functions for dynamic loading of Quill, Gantt, ASP.NET Data, and DevExtreme scripts, fixed typo in comment
e2e/testcafe-devextreme/helpers/safeSizeTest.ts Added support for test metadata in safeSizeTest function
e2e/testcafe-devextreme/helpers/accessibility/test.ts Added support for test metadata in accessibility testing
.github/workflows/testcafe_tests.yml Commented out treeList and pivotGrid test configurations

Comment on lines +119 to +125
const pageHTML = await t.eval(() => document.documentElement.outerHTML);
console.log('=== 2FULL PAGE HTML ===');
console.log(pageHTML);

const bodyHTML = await t.eval(() => document.body.innerHTML);
console.log('=== 2BODY HTML ===');
console.log(bodyHTML);
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should be removed before merging to production. These logging statements appear to be temporary debugging code that was left in the test.

Copilot uses AI. Check for mistakes.
Comment on lines +138 to +143
console.log('=== FULL PAGE HTML ===');
console.log(pageHTML);

const bodyHTML = await t.eval(() => document.body.innerHTML);
console.log('=== BODY HTML ===');
console.log(bodyHTML);
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should be removed before merging to production. These logging statements appear to be temporary debugging code that was left in the test before hook.

Suggested change
console.log('=== FULL PAGE HTML ===');
console.log(pageHTML);
const bodyHTML = await t.eval(() => document.body.innerHTML);
console.log('=== BODY HTML ===');
console.log(bodyHTML);
const bodyHTML = await t.eval(() => document.body.innerHTML);

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +36
// const LAUNCH_RETRY_ATTEMPTS = 5;
// const LAUNCH_RETRY_TIMEOUT = 20000;
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out retry constants suggest incomplete implementation. If retry logic is intentionally disabled, these constants should be removed; if retry functionality is still needed, the code should be uncommented and properly integrated.

Suggested change
// const LAUNCH_RETRY_ATTEMPTS = 5;
// const LAUNCH_RETRY_TIMEOUT = 20000;

Copilot uses AI. Check for mistakes.
Comment on lines +261 to +263
// eslint-disable-next-line no-plusplus
testRunCounter++;
console.log(`🔄 Test run #${testRunCounter} started`);
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statement should be removed or replaced with proper logging mechanism for production code.

Copilot uses AI. Check for mistakes.
Comment on lines +273 to +277
const executionCount = testExecutionMap.get(name);
if (executionCount! > 1) {
console.log(`🔁 Test "${name}" - retry attempt #${executionCount}`);
} else {
console.log(`✅ Test "${name}" - first run`);
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should be removed or replaced with proper logging mechanism for production code.

Copilot uses AI. Check for mistakes.
Comment on lines +319 to +322
// await loadScripts(t, 'axe.min.js', {
// basePath: '../../../node_modules/axe-core/',
// checkExists: 'axe',
// });
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out code should be removed if no longer needed. If this is a temporary change or alternative implementation, add a comment explaining why it's preserved.

Suggested change
// await loadScripts(t, 'axe.min.js', {
// basePath: '../../../node_modules/axe-core/',
// checkExists: 'axe',
// });

Copilot uses AI. Check for mistakes.
}
process.exit(1);
});
await testCafe.close();
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test runner closes TestCafe immediately without waiting for test execution to complete. The runner.run() call and result handling logic appears to be missing, which will cause tests to never execute.

Copilot uses AI. Check for mistakes.
Comment on lines +352 to +380
// let testCafe: TestCafe;

// createTestCafe(TESTCAFE_CONFIG)
// .then(async (tc: TestCafe) => {
// testCafe = tc;

// const args = getArgs();
// const testName = args.test.trim();
// const reporter = typeof args.reporter === 'string' ? args.reporter.trim() : args.reporter;
// const indices = args.indices.trim();
// let componentFolder = args.componentFolder.trim();
// const file = args.file.trim();

// setTestingPlatform(args);
// setTestingTheme(args);
// setShadowDom(args);

// componentFolder = componentFolder ? `${componentFolder}/**` : '**';
// if (fs.existsSync('./screenshots')) {
// fs.rmSync('./screenshots', { recursive: true });
// }

// const browsers = args.browsers
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large block of commented-out code (lines 352-560) should be removed. This appears to be the old implementation that has been replaced. If this code needs to be preserved for reference, it should be documented in version control history rather than kept as comments.

Suggested change
// let testCafe: TestCafe;
// createTestCafe(TESTCAFE_CONFIG)
// .then(async (tc: TestCafe) => {
// testCafe = tc;
// const args = getArgs();
// const testName = args.test.trim();
// const reporter = typeof args.reporter === 'string' ? args.reporter.trim() : args.reporter;
// const indices = args.indices.trim();
// let componentFolder = args.componentFolder.trim();
// const file = args.file.trim();
// setTestingPlatform(args);
// setTestingTheme(args);
// setShadowDom(args);
// componentFolder = componentFolder ? `${componentFolder}/**` : '**';
// if (fs.existsSync('./screenshots')) {
// fs.rmSync('./screenshots', { recursive: true });
// }
// const browsers = args.browsers

Copilot uses AI. Check for mistakes.
@EugeniyKiyashko EugeniyKiyashko force-pushed the 25_2_split_a11y_tests_speedup branch from bfff62b to d7ef866 Compare October 20, 2025 19:03
@EugeniyKiyashko EugeniyKiyashko changed the title e2e tests: move Gantt, FilterBuilder, Pagination to common folder e2e components tests: speed up tests execution Oct 22, 2025
@Copilot Copilot AI review requested due to automatic review settings October 22, 2025 17:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 5 comments.

Comment on lines +137 to +143
const pageHTML = await t.eval(() => document.documentElement.outerHTML);
console.log('=== FULL PAGE HTML ===');
console.log(pageHTML);

const bodyHTML = await t.eval(() => document.body.innerHTML);
console.log('=== BODY HTML ===');
console.log(bodyHTML);
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should be removed before merging to production. These appear to be leftover debugging code from development.

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +99
// const wait = async (
// timeout: number,
// // eslint-disable-next-line no-promise-executor-return
// ): Promise<void> => new Promise((resolve) => setTimeout(resolve, timeout));

// const retry = async <T>(action: () => Promise<T>, attempt: number): Promise<T> => {
// try {
// return await action();
// } catch (error) {
// if (attempt <= 1) {
// throw error;
// }

// /* eslint-disable no-console */
// console.log('\n > error occurred during testcafe launch!\n');
// console.error(error);
// console.info(`\n > waiting ${LAUNCH_RETRY_TIMEOUT / 1000} seconds...\n`);
// await wait(LAUNCH_RETRY_TIMEOUT);
// console.info('\n > retry launching testcafe\n');
// /* eslint-enable no-console */
// return retry(action, attempt - 1);
// }
// };
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large blocks of commented-out code reduce code readability and maintainability. If this retry mechanism is no longer needed, it should be removed entirely. If there's a possibility of needing it again, consider documenting the reason for its removal in a comment or tracking it in version control history instead.

Copilot uses AI. Check for mistakes.
Comment on lines +358 to +361
// let testCafe: TestCafe;

// createTestCafe(TESTCAFE_CONFIG)
// .then(async (tc: TestCafe) => {
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over 200 lines of commented-out code (lines 358-566) significantly reduce code readability. This appears to be the old implementation before refactoring to async/await. Since this code is preserved in version control, it should be removed entirely from the file.

Copilot uses AI. Check for mistakes.
Comment on lines +162 to +167
// interface LoadOptions {
// basePath?: string;
// checkExists?: string;
// }

// // async function loadResources(
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large blocks of commented-out code (lines 162-312) should be removed. This appears to be unused alternative implementations of resource loading. Since the code is tracked in version control, there's no need to keep it commented out in the source file.

Copilot uses AI. Check for mistakes.
{ componentFolder: "dataGrid/sticky/fixed", name: "dataGrid / sticky (3/3)", indices: "3/3" },
{ componentFolder: "cardView", name: "cardView" },
{ componentFolder: "cardView", name: "cardView - material", theme: 'material.blue.light' },
{ componentFolder: "cardView", name: "cardView - fluent", theme: 'fluent.blue.light' },
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pivotGrid tests are commented out without explanation. Consider adding a comment explaining why these tests are disabled or create a tracking issue if this is temporary. YAML uses '#' for comments but mixing commented configuration with active configuration can lead to confusion.

Suggested change
{ componentFolder: "cardView", name: "cardView - fluent", theme: 'fluent.blue.light' },
{ componentFolder: "cardView", name: "cardView - fluent", theme: 'fluent.blue.light' },
# The following pivotGrid tests are temporarily disabled due to known instability/issues.
# See https://github.com/your-org/your-repo/issues/1234 for tracking and re-enabling.

Copilot uses AI. Check for mistakes.
@EugeniyKiyashko EugeniyKiyashko force-pushed the 25_2_split_a11y_tests_speedup branch from 76cd081 to 021a22c Compare October 24, 2025 05:28
@Copilot Copilot AI review requested due to automatic review settings October 24, 2025 06:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 34 out of 38 changed files in this pull request and generated 5 comments.

const testExecutionMap = new Map<string, number>();

const runOptions: RunOptions = {
quarantineMode: false, // { successThreshold: 1, attemptLimit: 1 },
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quarantine mode is disabled with commented configuration inline. If this is intentional, the comment should be removed; otherwise, the proper configuration should be uncommented.

Suggested change
quarantineMode: false, // { successThreshold: 1, attemptLimit: 1 },
quarantineMode: false,

Copilot uses AI. Check for mistakes.
if (!componentFolder.includes('accessibility')) {
// @ts-expect-error ts-errors
const { meta } = t.testRun.test;
console.log('Test meta:', meta);
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console logging should be removed before merging. This appears to be temporary debugging output.

Suggested change
console.log('Test meta:', meta);

Copilot uses AI. Check for mistakes.
before: async () => {
// eslint-disable-next-line no-plusplus
testRunCounter++;
console.log(`🔄 Test run #${testRunCounter} started`);
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console logging should be removed or converted to a proper logger before merging. Multiple console.log statements for test execution tracking appear to be temporary debugging code.

Copilot uses AI. Check for mistakes.

const executionCount = testExecutionMap.get(name);
if (executionCount! > 1) {
console.log(`🔁 Test "${name}" - retry attempt #${executionCount}`);
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console logging should be removed or converted to a proper logger before merging. Multiple console.log statements for test execution tracking appear to be temporary debugging code.

Copilot uses AI. Check for mistakes.
if (executionCount! > 1) {
console.log(`🔁 Test "${name}" - retry attempt #${executionCount}`);
} else {
console.log(`✅ Test "${name}" - first run`);
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console logging should be removed or converted to a proper logger before merging. Multiple console.log statements for test execution tracking appear to be temporary debugging code.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant