DataGrid - AI Assistant: request customization e2e tests#33807
Open
Alyar666 wants to merge 2 commits into
Open
DataGrid - AI Assistant: request customization e2e tests#33807Alyar666 wants to merge 2 commits into
Alyar666 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
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
onAIAssistantRequestCreatingcustomization, 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'); | ||
| } |
fcfb747 to
0d60ab2
Compare
`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>
0d60ab2 to
f7a3636
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does the PR change?
Adds e2e TestCafe tests for the DataGrid AI Assistant —
onAIAssistantRequestCreatingcontext/schema/component customization, request context reflecting external column changes, and request cancellation via the handler'scancelflag (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.sendRequestis mocked to return deterministic responses; assertions check chat status and grid state via POM accessors. The PR also includes the sharedtestHelpers.tsand AI Assistanttestcafe-modelsPOM accessors the suite depends on.How can we verify these changes?