Skip to content

fix: resolve failing AI Debugger _sendMessage test and add consent fallback test#7403

Open
kartikktripathi wants to merge 1 commit into
sugarlabs:masterfrom
kartikktripathi:aidebuggerfix
Open

fix: resolve failing AI Debugger _sendMessage test and add consent fallback test#7403
kartikktripathi wants to merge 1 commit into
sugarlabs:masterfrom
kartikktripathi:aidebuggerfix

Conversation

@kartikktripathi
Copy link
Copy Markdown
Contributor

@kartikktripathi kartikktripathi commented May 20, 2026

Summary

This PR fixes a failing test in the AI Debugger widget test suite (js/widgets/__tests__/aidebugger.test.js) and improves test coverage around user consent handling.

Testing

  • Ran npm test locally. All 5349 tests pass successfully.
  • Verified that chatHistory behaves exactly as expected both before and after user consent is mocked.

Category

  • Bug Fix

Thanks!

@github-actions github-actions Bot added bug fix Fixes a bug or incorrect behavior size/S Small: 10-49 lines changed area/javascript Changes to JS source files area/tests Changes to test files labels May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Jest Test Results

✅ All Jest tests passed! This PR is ready to merge.

Coverage: Statements: 48.04% | Branches: 39.52% | Functions: 52.82% | Lines: 48.44%
Master Coverage: Statements: 48.11% | Branches: 39.52% | Functions: 52.84% | Lines: 48.52%

Copy link
Copy Markdown
Contributor

@mahesh-09-12 mahesh-09-12 left a comment

Choose a reason for hiding this comment

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

the consent-flow coverage addition looks good to me, especially verifying both the blocked and allowed _sendMessage paths separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/javascript Changes to JS source files area/tests Changes to test files bug fix Fixes a bug or incorrect behavior size/S Small: 10-49 lines changed

Projects

Development

Successfully merging this pull request may close these issues.

2 participants