DataGrid - AI Assistant: error handling e2e tests#33809
Open
Alyar666 wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new TestCafe e2e suite that validates DataGrid AI Assistant error-handling behavior (invalid response formats, validation failures, per-command execution failures, and provider rejections) using a mocked aiIntegration.sendRequest. The PR also extends the shared TestCafe page models to expose AI Assistant chat UI/state and a couple of DataGrid API helpers needed by the tests.
Changes:
- Added
errorHandling.functional.tscovering AI Assistant negative/error paths with deterministic mocked provider responses. - Extended
devextreme-testcafe-modelsDataGrid + AI Assistant chat models with new accessors/helpers used by the suite. - Added shared
testHelpers.tsutilities for AI Assistant e2e tests (page URL, localization lookup).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/testcafe-models/dataGrid/index.ts | Adds DataGrid client-side helper to read DataSource sort params + a focus helper for the AI Assistant button. |
| packages/testcafe-models/dataGrid/aiAssistantChat.ts | Extends AI Assistant chat POM with input/message/suggestion helpers and abort-confirm dialog accessors. |
| packages/testcafe-models/chat.ts | Adds a reusable getMessageBubbles() accessor and reuses it in getMessage(). |
| e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/testHelpers.ts | New shared constants + client-side helpers (page URL, formatMessage, request inspection hook). |
| e2e/testcafe-devextreme/tests/dataGrid/common/aiAssistant/errorHandling.functional.ts | New comprehensive e2e test file for AI Assistant error-handling across layers. |
fad0c0b to
6d10edb
Compare
error handling across layers — AI-integration, response-format, validation and per-command execution failures, plus the negative/rejection cases; predefined error text is asserted by localization key (plan §2, §4) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ed POM methods Extract shared setup/assertion helpers (grid factory, openChatAndSubmit, expectInvalidResponse) into the test file; add missing grid-state and error-text assertions for empty-actions, provider rejection, 4.3.11 and 4.4.4 searching; align fixtures with the commands suite. Remove POM/testHelpers methods added but not used by this PR (focusAIAssistantButton, abort-confirm/suggestion/disabled accessors, getUserMessages, getTitle, getRequestColumnNames).
6d10edb to
d542046
Compare
Comment on lines
+184
to
+188
| await t.expect(aiChat.getMessages().count).eql(2); | ||
| await t.expect(aiChat.getSuccessMessages().count).eql(0); | ||
| await t.expect(aiChat.getErrorMessages().count).eql(1); | ||
| await t.expect(aiChat.getErrorActionItems(0).count).eql(0); | ||
| await t.expect(dataGrid.apiOption('selectedRowKeys')).eql([]); |
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 — error handling across layers — AI-integration, response-format, validation and per-command execution failures, plus the negative/rejection cases; predefined error text is asserted by localization key (plan §2, §4).
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?