Skip to content

DataGrid - AI Assistant: request customization e2e tests#33807

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

DataGrid - AI Assistant: request customization e2e tests#33807
Alyar666 wants to merge 2 commits into
DevExpress:26_1from
Alyar666:ai_assistant_e2e_request_customization_26_1

Conversation

@Alyar666
Copy link
Copy Markdown
Contributor

@Alyar666 Alyar666 commented Jun 2, 2026

What does the PR change?

Adds e2e TestCafe tests for the DataGrid AI AssistantonAIAssistantRequestCreating context/schema/component customization, request context reflecting external column changes, and request cancellation via the handler's cancel flag (plan §1.11, §3.13, §5.1).

Part of splitting the AI Assistant e2e suite into per-area pull requests.

How did you achieve this?

aiAssistant.aiIntegration.sendRequest is mocked to return deterministic responses; assertions check chat status and grid state via POM accessors. The PR also includes the shared testHelpers.ts and AI Assistant testcafe-models POM accessors the suite depends on.

How can we verify these changes?

pnpm nx test devextreme-testcafe-tests -- --componentFolder dataGrid/common/aiAssistant --file requestCustomization.functional --browsers 'chrome:headless' --concurrency 1

Copilot AI review requested due to automatic review settings June 2, 2026 22:30
@Alyar666 Alyar666 requested a review from a team as a code owner June 2, 2026 22:30
@Alyar666 Alyar666 self-assigned this Jun 2, 2026
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 DataGrid’s AI Assistant request customization scenarios (request-creation customization, context updates after external column changes, and cancellation via cancel), along with supporting POM accessors in testcafe-models used by the new suite.

Changes:

  • Added a new DataGrid AI Assistant TestCafe spec covering onAIAssistantRequestCreating customization, request context updates after external option changes, and request cancellation.
  • Added shared AI Assistant TestCafe helpers for deterministic request assertions.
  • Extended devextreme-testcafe-models (DataGrid, AI Assistant Chat, and Chat) with additional accessors used by the new tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/testcafe-models/dataGrid/index.ts Adds DataGrid POM helpers for reading DataSource sort params and focusing the AI Assistant button.
packages/testcafe-models/dataGrid/aiAssistantChat.ts Extends AI Assistant chat POM with input/messages/suggestions helpers and abort-confirm dialog selectors.
packages/testcafe-models/chat.ts Adds getMessageBubbles() helper used by AI Assistant chat POM.
e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/testHelpers.ts Introduces shared helpers/constants for the AI Assistant e2e tests.
e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/requestCustomization.functional.ts Adds the new request customization/cancellation TestCafe test suite for DataGrid AI Assistant.

Comment on lines +56 to +59
// eslint-disable-next-line class-methods-use-this
getAbortConfirmYesButton(): Selector {
return Selector(`.${CLASS.abortConfirmDialog} .dx-button`).withExactText('Yes');
}
Copilot AI review requested due to automatic review settings June 4, 2026 23:47
@Alyar666 Alyar666 force-pushed the ai_assistant_e2e_request_customization_26_1 branch from fcfb747 to 0d60ab2 Compare June 4, 2026 23:47
`onAIAssistantRequestCreating` context/schema/component customization, request context reflecting external column changes, and request cancellation via the handler's `cancel` flag (plan §1.11, §3.13, §5.1)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Alyar666 Alyar666 force-pushed the ai_assistant_e2e_request_customization_26_1 branch from 0d60ab2 to f7a3636 Compare June 4, 2026 23:47
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

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

Comment on lines +57 to +59
getAbortConfirmYesButton(): Selector {
return Selector(`.${CLASS.abortConfirmDialog} .dx-button`).withExactText('Yes');
}
actionListItemIcon: 'dx-ai-chat__action-list-item-icon',
actionListItemText: 'dx-ai-chat__action-list-item-text',
closeButton: 'dx-closebutton',
clearChatButton: 'dx-icon-clearhistory',
Comment on lines 61 to 63
getClearChatButton(): Selector {
return this.element.find(`.${CLASS.clearChatButton}`);
}
Comment on lines +141 to +145
isClearChatDisabled(): Promise<boolean> {
return this.getClearChatButton()
.parent('.dx-button')
.hasClass('dx-state-disabled');
}
- Share a single mocked AIIntegration factory and onAIAssistantRequestCreating
  handlers at the top of requestCustomization.functional.ts, consistent with
  the commands.functional.ts reference (no per-test mock duplication).
- Unify chat-message assertions and add grid-state checks; strengthen 1.11.3
  (component is the grid, element is its root); split 5.1.3 into both branches
  of the dynamic cancel check.
- Reduce testHelpers to the shared page constants; drop unused testcafe-models
  additions (revert chat.ts and dataGrid/index.ts, keep only getInput and
  isInputDisabled in aiAssistantChat).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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