Skip to content

DataGrid - AI Assistant: error handling e2e tests#33809

Merged
Alyar666 merged 9 commits into
DevExpress:26_1from
Alyar666:ai_assistant_e2e_error_handling_26_1
Jun 16, 2026
Merged

DataGrid - AI Assistant: error handling e2e tests#33809
Alyar666 merged 9 commits into
DevExpress:26_1from
Alyar666:ai_assistant_e2e_error_handling_26_1

Conversation

@Alyar666

@Alyar666 Alyar666 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings June 2, 2026 22:31
@Alyar666 Alyar666 requested a review from a team as a code owner June 2, 2026 22:31
@Alyar666 Alyar666 self-assigned this Jun 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.ts covering AI Assistant negative/error paths with deterministic mocked provider responses.
  • Extended devextreme-testcafe-models DataGrid + AI Assistant chat models with new accessors/helpers used by the suite.
  • Added shared testHelpers.ts utilities 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.

Comment thread packages/testcafe-models/dataGrid/aiAssistantChat.ts Outdated
Comment thread packages/testcafe-models/dataGrid/aiAssistantChat.ts
Copilot AI review requested due to automatic review settings June 5, 2026 08:14
@Alyar666 Alyar666 force-pushed the ai_assistant_e2e_error_handling_26_1 branch from fad0c0b to 6d10edb Compare June 5, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 comments.

Comment thread packages/testcafe-models/dataGrid/aiAssistantChat.ts Outdated
Comment thread packages/testcafe-models/dataGrid/aiAssistantChat.ts
@Alyar666 Alyar666 force-pushed the ai_assistant_e2e_error_handling_26_1 branch from 6d10edb to d542046 Compare June 5, 2026 08:39
Copilot AI review requested due to automatic review settings June 5, 2026 09:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 1 comment.

@Alyar666 Alyar666 force-pushed the ai_assistant_e2e_error_handling_26_1 branch from 82ef58f to 01316d8 Compare June 8, 2026 00:22
Copilot AI review requested due to automatic review settings June 8, 2026 02:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 1 comment.

Comment thread packages/testcafe-models/dataGrid/aiAssistantChat.ts
Copilot AI review requested due to automatic review settings June 8, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 2 comments.

Copilot AI review requested due to automatic review settings June 8, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 comments.

Comment thread packages/testcafe-models/dataGrid/aiAssistantChat.ts
Alyar and others added 4 commits June 16, 2026 14:42
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).
…nt keys

Add the required preserve arg so the command runs instead of failing schema
validation; assert it succeeds and selects no rows (Copilot review).
Alyar added 3 commits June 16, 2026 14:50
Replace the kind-based mock with the shared queue helper (raw response / FAIL);
keep a local no-integration grid factory for the missing-aiIntegration case.
Collapse the per-section fixtures into a single named fixture; keep the
// === §X === markers as in-file section dividers.
…ync grid reads to t.expect

Restore the scoped getWrapper override; drop await inside t.expect so TestCafe
retries async grid-state assertions (Copilot review).
@Alyar666 Alyar666 force-pushed the ai_assistant_e2e_error_handling_26_1 branch from c25ec6f to d6e58e4 Compare June 16, 2026 11:38
Copilot AI review requested due to automatic review settings June 16, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 2 out of 2 changed files in this pull request and generated 1 comment.

@Alyar666 Alyar666 merged commit c634caf into DevExpress:26_1 Jun 16, 2026
130 of 131 checks passed
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.

3 participants