Skip to content

DataGrid - AI Assistant: Add e2e tests#33740

Open
Alyar666 wants to merge 2 commits into
DevExpress:26_1from
Alyar666:ai_assistant_add_e2e_tests_26_1
Open

DataGrid - AI Assistant: Add e2e tests#33740
Alyar666 wants to merge 2 commits into
DevExpress:26_1from
Alyar666:ai_assistant_add_e2e_tests_26_1

Conversation

@Alyar666
Copy link
Copy Markdown
Contributor

No description provided.

@Alyar666 Alyar666 self-assigned this May 27, 2026
Copilot AI review requested due to automatic review settings May 27, 2026 07:45
@Alyar666 Alyar666 requested a review from a team as a code owner May 27, 2026 07:45
Copy link
Copy Markdown
Contributor

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

Adds end-to-end (TestCafe) coverage for the DataGrid AI Assistant feature, extending the existing TestCafe models to support new UI elements (suggestions/title) and introducing positive/negative functional scenarios.

Changes:

  • Extended the AIAssistantChat TestCafe model with selectors for suggestions and header/title access.
  • Added a large “positive cases” functional suite covering toolbar entry, command execution, suggestions, customization hooks, request-creating hook, and regenerate flow.
  • Added a “negative cases” functional suite for empty actions, unknown fields, impossible state commands, and provider errors; also added new AI-assistant helper modules (currently unused).

Reviewed changes

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

Show a summary per file
File Description
packages/testcafe-models/dataGrid/aiAssistantChat.ts Adds selectors/helpers for chat suggestions and title access (but currently breaks TS due to missing Selector import).
e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/positiveCases.functional.ts New comprehensive positive-path functional coverage for AI Assistant behaviors.
e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/negativeCases.functional.ts New negative-path functional coverage for AI Assistant error/edge scenarios.
e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/helpers/testData.ts Adds shared test data/grid config helpers (currently unused).
e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/helpers/aiMock.ts Adds AIIntegration mock helpers (currently unused; includes a doc example referencing a nonexistent helper).
Comments suppressed due to low confidence (1)

packages/testcafe-models/dataGrid/aiAssistantChat.ts:35

  • Selector is referenced in method signatures/returns (e.g., getWrapper(): Selector) but it's no longer imported in this file, which will cause a TypeScript compile error. Add back an import (prefer import type { Selector } from 'testcafe'; if it’s type-only).
export class AIAssistantChat extends Popup {
  getWrapper(): Selector {
    return this.element;
  }

Comment on lines +653 to +656
await t
.typeText(chat.getInput(), 'Sort by name')
.pressKey('enter');

Comment on lines +1 to +36
export const GRID_SELECTOR = '#container';

export const SIMPLE_DATA = [
{ id: 1, name: 'Alice', value: 30 },
{ id: 2, name: 'Bob', value: 20 },
{ id: 3, name: 'Charlie', value: 10 },
];

export const PAGED_DATA = Array.from({ length: 20 }, (_, i) => ({
id: i + 1,
name: `Name ${i + 1}`,
value: (i + 1) * 10,
}));

export const DEFAULT_COLUMNS = ['id', 'name', 'value'];

export function getBaseGridConfig(): Record<string, unknown> {
return {
dataSource: SIMPLE_DATA,
keyExpr: 'id',
columns: DEFAULT_COLUMNS,
showBorders: true,
};
}

export function getPagedGridConfig(): Record<string, unknown> {
return {
dataSource: PAGED_DATA,
keyExpr: 'id',
columns: DEFAULT_COLUMNS,
showBorders: true,
paging: {
pageSize: 5,
},
};
}
Comment on lines +1 to +6
interface MockSendRequestOptions {
response?: Record<string, unknown>;
reject?: boolean;
error?: Error | string;
delay?: number;
}
Comment on lines +12 to +19
* @example
* ```ts
* await createWidget('dxDataGrid', () => ({
* ...getGridConfig(),
* aiAssistant: {
* enabled: true,
* aiIntegration: createAIIntegrationMock({
* response: {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants