@cometchat/skills 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -2
- package/bin/install.js +448 -57
- package/package.json +1 -1
- package/skills/cometchat/SKILL.md +337 -80
- package/skills/cometchat-a11y/SKILL.md +476 -0
- package/skills/cometchat-android-v5/SKILL.md +1 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +413 -0
- package/skills/cometchat-android-v5-calls/references/README.md +53 -0
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +195 -0
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +91 -0
- package/skills/cometchat-android-v5-calls/references/background-handling.md +168 -0
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +123 -0
- package/skills/cometchat-android-v5-calls/references/call-logs.md +113 -0
- package/skills/cometchat-android-v5-calls/references/call-session.md +274 -0
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +150 -0
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +123 -0
- package/skills/cometchat-android-v5-calls/references/group-calls.md +205 -0
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +111 -0
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +134 -0
- package/skills/cometchat-android-v5-calls/references/join-session.md +120 -0
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +206 -0
- package/skills/cometchat-android-v5-calls/references/participant-management.md +110 -0
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +106 -0
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +242 -0
- package/skills/cometchat-android-v5-calls/references/recording.md +101 -0
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +152 -0
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +82 -0
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +215 -0
- package/skills/cometchat-android-v5-calls/references/session-settings.md +121 -0
- package/skills/cometchat-android-v5-calls/references/setup.md +137 -0
- package/skills/cometchat-android-v5-calls/references/share-invite.md +151 -0
- package/skills/cometchat-android-v5-calls/references/video-controls.md +87 -0
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +526 -0
- package/skills/cometchat-android-v5-components/SKILL.md +1 -1
- package/skills/cometchat-android-v5-core/SKILL.md +1 -1
- package/skills/cometchat-android-v5-customization/SKILL.md +1 -1
- package/skills/cometchat-android-v5-extensions/SKILL.md +1 -1
- package/skills/cometchat-android-v5-features/SKILL.md +1 -1
- package/skills/cometchat-android-v5-placement/SKILL.md +1 -1
- package/skills/cometchat-android-v5-production/SKILL.md +1 -1
- package/skills/cometchat-android-v5-push/SKILL.md +1 -1
- package/skills/cometchat-android-v5-testing/SKILL.md +1 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +1 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-android-v6/SKILL.md +1 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +1 -1
- package/skills/cometchat-android-v6-calls/SKILL.md +375 -0
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +97 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +91 -0
- package/skills/cometchat-android-v6-calls/references/call-session.md +163 -0
- package/skills/cometchat-android-v6-calls/references/device-management.md +171 -0
- package/skills/cometchat-android-v6-calls/references/group-calls.md +191 -0
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +107 -0
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +136 -0
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +186 -0
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +176 -0
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +127 -0
- package/skills/cometchat-android-v6-calls/references/share-invite.md +105 -0
- package/skills/cometchat-android-v6-compose-components/SKILL.md +2 -2
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +1 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +1 -1
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +1 -1
- package/skills/cometchat-android-v6-core/SKILL.md +1 -1
- package/skills/cometchat-android-v6-events/SKILL.md +1 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +1 -1
- package/skills/cometchat-android-v6-features/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +1 -1
- package/skills/cometchat-android-v6-migration/SKILL.md +398 -0
- package/skills/cometchat-android-v6-production/SKILL.md +1 -1
- package/skills/cometchat-android-v6-push/SKILL.md +1 -1
- package/skills/cometchat-android-v6-testing/SKILL.md +1 -1
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-angular-calls/SKILL.md +511 -0
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +95 -0
- package/skills/cometchat-angular-calls/references/call-layouts.md +106 -0
- package/skills/cometchat-angular-calls/references/call-session.md +167 -0
- package/skills/cometchat-angular-calls/references/custom-ui.md +231 -0
- package/skills/cometchat-angular-calls/references/device-management.md +135 -0
- package/skills/cometchat-angular-calls/references/group-calls.md +412 -0
- package/skills/cometchat-angular-calls/references/idle-timeout.md +145 -0
- package/skills/cometchat-angular-calls/references/in-call-chat.md +148 -0
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +205 -0
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +53 -0
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +183 -0
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +285 -0
- package/skills/cometchat-angular-calls/references/raise-hand.md +167 -0
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +267 -0
- package/skills/cometchat-angular-calls/references/ringing-integration.md +131 -0
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +100 -0
- package/skills/cometchat-angular-calls/references/share-invite.md +116 -0
- package/skills/cometchat-angular-components/SKILL.md +1 -1
- package/skills/cometchat-angular-core/SKILL.md +1 -1
- package/skills/cometchat-angular-customization/SKILL.md +1 -1
- package/skills/cometchat-angular-features/SKILL.md +1 -1
- package/skills/cometchat-angular-patterns/SKILL.md +1 -1
- package/skills/cometchat-angular-placement/SKILL.md +1 -1
- package/skills/cometchat-angular-production/SKILL.md +1 -1
- package/skills/cometchat-angular-push/SKILL.md +403 -0
- package/skills/cometchat-angular-testing/SKILL.md +333 -0
- package/skills/cometchat-angular-theming/SKILL.md +1 -1
- package/skills/cometchat-angular-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-astro-patterns/SKILL.md +1 -1
- package/skills/cometchat-calls/SKILL.md +358 -0
- package/skills/cometchat-calls/references/use-case-broadcast.md +194 -0
- package/skills/cometchat-calls/references/use-case-marketplace.md +158 -0
- package/skills/cometchat-calls/references/use-case-support.md +190 -0
- package/skills/cometchat-calls/references/use-case-team.md +169 -0
- package/skills/cometchat-calls/references/use-case-telehealth.md +154 -0
- package/skills/cometchat-components/SKILL.md +1 -1
- package/skills/cometchat-core/SKILL.md +1 -1
- package/skills/cometchat-customization/SKILL.md +2 -2
- package/skills/cometchat-features/SKILL.md +2 -2
- package/skills/cometchat-flutter-v5/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-calls/SKILL.md +325 -94
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +169 -0
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +98 -0
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +330 -0
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +120 -0
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +187 -0
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +97 -0
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +132 -0
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +160 -0
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +244 -0
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +193 -0
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +101 -0
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +142 -0
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-customization/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-events/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-push/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +390 -0
- package/skills/cometchat-flutter-v5-theming/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-calls/SKILL.md +308 -243
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +134 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +102 -0
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +229 -0
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +99 -0
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +190 -0
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +80 -0
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +122 -0
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +268 -0
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +171 -0
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +93 -0
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +102 -0
- package/skills/cometchat-flutter-v6-components/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-core/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-customization/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-events/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-features/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-messages/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-migration/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-placement/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-production/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-push/SKILL.md +452 -0
- package/skills/cometchat-flutter-v6-testing/SKILL.md +319 -0
- package/skills/cometchat-flutter-v6-theming/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +1 -1
- package/skills/cometchat-i18n/SKILL.md +358 -0
- package/skills/cometchat-ios/SKILL.md +5 -5
- package/skills/cometchat-ios-calls/SKILL.md +409 -0
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +172 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +189 -0
- package/skills/cometchat-ios-calls/references/call-layouts.md +136 -0
- package/skills/cometchat-ios-calls/references/call-session.md +221 -0
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +353 -0
- package/skills/cometchat-ios-calls/references/custom-ui.md +322 -0
- package/skills/cometchat-ios-calls/references/device-management.md +171 -0
- package/skills/cometchat-ios-calls/references/group-calls.md +396 -0
- package/skills/cometchat-ios-calls/references/idle-timeout.md +185 -0
- package/skills/cometchat-ios-calls/references/in-call-chat.md +183 -0
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +138 -0
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +246 -0
- package/skills/cometchat-ios-calls/references/raise-hand.md +239 -0
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +339 -0
- package/skills/cometchat-ios-calls/references/ringing-integration.md +142 -0
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +267 -0
- package/skills/cometchat-ios-calls/references/share-invite.md +152 -0
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +246 -0
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +166 -0
- package/skills/cometchat-ios-components/SKILL.md +1 -1
- package/skills/cometchat-ios-core/SKILL.md +1 -1
- package/skills/cometchat-ios-customization/SKILL.md +1 -1
- package/skills/cometchat-ios-features/SKILL.md +1 -1
- package/skills/cometchat-ios-placement/SKILL.md +1 -1
- package/skills/cometchat-ios-production/SKILL.md +1 -1
- package/skills/cometchat-ios-push/SKILL.md +1 -1
- package/skills/cometchat-ios-testing/SKILL.md +371 -0
- package/skills/cometchat-ios-theming/SKILL.md +1 -1
- package/skills/cometchat-ios-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-native-bare-patterns/SKILL.md +45 -3
- package/skills/cometchat-native-calls/SKILL.md +599 -0
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +203 -0
- package/skills/cometchat-native-calls/references/call-layouts.md +124 -0
- package/skills/cometchat-native-calls/references/call-session.md +182 -0
- package/skills/cometchat-native-calls/references/custom-ui.md +250 -0
- package/skills/cometchat-native-calls/references/device-management.md +135 -0
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +179 -0
- package/skills/cometchat-native-calls/references/group-calls.md +291 -0
- package/skills/cometchat-native-calls/references/idle-timeout.md +128 -0
- package/skills/cometchat-native-calls/references/in-call-chat.md +143 -0
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +72 -0
- package/skills/cometchat-native-calls/references/picture-in-picture.md +276 -0
- package/skills/cometchat-native-calls/references/raise-hand.md +203 -0
- package/skills/cometchat-native-calls/references/recording-screen-share.md +290 -0
- package/skills/cometchat-native-calls/references/ringing-integration.md +118 -0
- package/skills/cometchat-native-calls/references/server-push-bridge.md +135 -0
- package/skills/cometchat-native-calls/references/server-push-payloads.md +193 -0
- package/skills/cometchat-native-calls/references/share-invite.md +144 -0
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +317 -0
- package/skills/cometchat-native-components/SKILL.md +1 -1
- package/skills/cometchat-native-core/SKILL.md +1 -1
- package/skills/cometchat-native-customization/SKILL.md +1 -1
- package/skills/cometchat-native-expo-patterns/SKILL.md +18 -1
- package/skills/cometchat-native-features/SKILL.md +1 -1
- package/skills/cometchat-native-placement/SKILL.md +1 -1
- package/skills/cometchat-native-production/SKILL.md +1 -1
- package/skills/cometchat-native-push/SKILL.md +1 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -1
- package/skills/cometchat-native-theming/SKILL.md +1 -1
- package/skills/cometchat-native-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-nextjs-patterns/SKILL.md +1 -1
- package/skills/cometchat-placement/SKILL.md +29 -1
- package/skills/cometchat-production/SKILL.md +1 -1
- package/skills/cometchat-react-calls/SKILL.md +539 -0
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +145 -0
- package/skills/cometchat-react-calls/references/call-layouts.md +161 -0
- package/skills/cometchat-react-calls/references/call-session.md +235 -0
- package/skills/cometchat-react-calls/references/custom-ui.md +201 -0
- package/skills/cometchat-react-calls/references/device-management.md +206 -0
- package/skills/cometchat-react-calls/references/group-calls.md +262 -0
- package/skills/cometchat-react-calls/references/idle-timeout.md +175 -0
- package/skills/cometchat-react-calls/references/in-call-chat.md +212 -0
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +172 -0
- package/skills/cometchat-react-calls/references/picture-in-picture.md +245 -0
- package/skills/cometchat-react-calls/references/raise-hand.md +238 -0
- package/skills/cometchat-react-calls/references/recording-screen-share.md +143 -0
- package/skills/cometchat-react-calls/references/ringing-integration.md +255 -0
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +241 -0
- package/skills/cometchat-react-calls/references/share-invite.md +176 -0
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +198 -0
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +165 -0
- package/skills/cometchat-react-patterns/SKILL.md +56 -8
- package/skills/cometchat-react-push/SKILL.md +448 -0
- package/skills/cometchat-react-router-patterns/SKILL.md +1 -1
- package/skills/cometchat-react-testing/SKILL.md +404 -0
- package/skills/cometchat-theming/SKILL.md +3 -3
- package/skills/cometchat-troubleshooting/SKILL.md +2 -2
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-customization
|
|
|
3
3
|
description: "Use when customizing CometChat Flutter UIKit v5 beyond props — custom bubbles, templates, DataSource decorators, slot views, formatters."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_uikit_shared ^5.2.3"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-events
|
|
|
3
3
|
description: "Use when working with CometChat Flutter UIKit v5 event system. Triggers on CometChatMessageEvents, CometChatUserEvents, CometChatGroupEvents, CometChatCallEvents, CometChatUIEvents, listeners."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_uikit_shared ^5.2.3; cometchat_sdk ^4.1.2"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-messages
|
|
|
3
3
|
description: "Use when working with CometChat Flutter UIKit v5 message components. Triggers on CometChatMessageList, CometChatMessageComposer, CometChatCompactMessageComposer, CometChatMessageHeader, threads."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_uikit_shared ^5.2.3"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-production
|
|
|
3
3
|
description: "Use when preparing a CometChat Flutter UIKit v5 app for production. Covers auth tokens, ProGuard, environment config, security hardening."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-push
|
|
|
3
3
|
description: "Use when implementing push notifications with CometChat Flutter UIKit v5. Covers FCM (Android), APNs (iOS), VoIP calls, token lifecycle, local notifications, and tap-to-navigate."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15; firebase_messaging; flutter_local_notifications; flutter_callkit_incoming"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-flutter-v5-testing
|
|
3
|
+
description: Testing patterns for CometChat Flutter UIKit v5 (GetX-based). Covers flutter_test (built-in), mocktail for SDK mocking, widget tests around CometChat widgets, integration_test for real-device flows, golden tests for theming, and CI on GitHub Actions / Codemagic. Sister skill of cometchat-flutter-v6-testing — the cohorts have different state-management primitives (GetX vs Bloc) so test patterns differ.
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "Flutter >= 2.5, Dart >= 2.17; flutter_test (built-in); mocktail >= 1.0; integration_test (built-in); cometchat_chat_uikit ^5.2; cometchat_calls_uikit ^5.0"
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
|
+
metadata:
|
|
8
|
+
author: "CometChat"
|
|
9
|
+
version: "4.0.0"
|
|
10
|
+
tags: "cometchat flutter v5 testing flutter-test mocktail widget-test integration-test golden-test getx ci codemagic"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Test recipes for Flutter UIKit v5. Covers the GetX-flavored patterns; v6 (Bloc) has its own skill (`cometchat-flutter-v6-testing`).
|
|
16
|
+
|
|
17
|
+
**Read these other skills first:**
|
|
18
|
+
- `cometchat-flutter-v5-core` — UIKitSettingsBuilder, init/login order, GetX scope rules
|
|
19
|
+
- `cometchat-flutter-v5-events` — event subscription patterns the tests assert against
|
|
20
|
+
|
|
21
|
+
**Ground truth:**
|
|
22
|
+
- flutter_test — https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html
|
|
23
|
+
- mocktail — https://pub.dev/packages/mocktail
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 1. Test layers
|
|
28
|
+
|
|
29
|
+
| Layer | Test runner | Speed | What it covers |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| Unit | `flutter test` (Dart VM) | Fastest | Pure Dart logic — services, models |
|
|
32
|
+
| Widget | `flutter test` (test environment) | Fast | Single widget, mocked dependencies |
|
|
33
|
+
| Integration | `flutter test integration_test/` (real device or simulator) | Slow | Full app flow, real SDK or mocked |
|
|
34
|
+
| Golden | `flutter test --update-goldens` then assert | Fast | Visual regression |
|
|
35
|
+
|
|
36
|
+
The skill writes all four; CI runs unit + widget + golden by default; integration runs on demand.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 2. Mocking the SDK with mocktail
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
# pubspec.yaml — dev dependencies
|
|
44
|
+
dev_dependencies:
|
|
45
|
+
flutter_test:
|
|
46
|
+
sdk: flutter
|
|
47
|
+
mocktail: ^1.0.0
|
|
48
|
+
integration_test:
|
|
49
|
+
sdk: flutter
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Wrap the SDK in protocols (testable abstraction)
|
|
53
|
+
|
|
54
|
+
```dart
|
|
55
|
+
// lib/services/cometchat_service.dart
|
|
56
|
+
import 'package:cometchat_calls_uikit/cometchat_calls_uikit.dart';
|
|
57
|
+
|
|
58
|
+
abstract class CometChatService {
|
|
59
|
+
Future<void> init();
|
|
60
|
+
Future<User> login(String uid);
|
|
61
|
+
Future<void> logout();
|
|
62
|
+
User? getLoggedInUser();
|
|
63
|
+
Future<TextMessage> sendMessage(TextMessage message);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
class CometChatServiceImpl implements CometChatService {
|
|
67
|
+
@override
|
|
68
|
+
Future<void> init() async {
|
|
69
|
+
final settings = (UIKitSettingsBuilder()
|
|
70
|
+
..appId = CometChatConfig.appId
|
|
71
|
+
..region = CometChatConfig.region
|
|
72
|
+
..authKey = CometChatConfig.authKey
|
|
73
|
+
..subscriptionType = CometChatSubscriptionType.allUsers
|
|
74
|
+
..callingExtension = CometChatCallingExtension())
|
|
75
|
+
.build();
|
|
76
|
+
await CometChatUIKit.init(uiKitSettings: settings);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@override
|
|
80
|
+
Future<User> login(String uid) async {
|
|
81
|
+
final completer = Completer<User>();
|
|
82
|
+
CometChatUIKit.login(uid, onSuccess: completer.complete, onError: completer.completeError);
|
|
83
|
+
return completer.future;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@override
|
|
87
|
+
Future<void> logout() async {
|
|
88
|
+
final completer = Completer<void>();
|
|
89
|
+
CometChatUIKit.logout(onSuccess: () => completer.complete(), onError: completer.completeError);
|
|
90
|
+
return completer.future;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@override
|
|
94
|
+
User? getLoggedInUser() => CometChatUIKit.getLoggedInUser();
|
|
95
|
+
|
|
96
|
+
@override
|
|
97
|
+
Future<TextMessage> sendMessage(TextMessage message) async {
|
|
98
|
+
final completer = Completer<TextMessage>();
|
|
99
|
+
CometChatUIKit.sendTextMessage(textMessage: message, onSuccess: completer.complete, onError: completer.completeError);
|
|
100
|
+
return completer.future;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Inject via your DI / GetX scope:
|
|
106
|
+
|
|
107
|
+
```dart
|
|
108
|
+
final cometchatService = Get.put<CometChatService>(CometChatServiceImpl());
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
In tests, swap with a mock:
|
|
112
|
+
|
|
113
|
+
```dart
|
|
114
|
+
class MockCometChatService extends Mock implements CometChatService {}
|
|
115
|
+
|
|
116
|
+
setUp(() {
|
|
117
|
+
Get.reset();
|
|
118
|
+
final mock = MockCometChatService();
|
|
119
|
+
when(() => mock.init()).thenAnswer((_) async {});
|
|
120
|
+
when(() => mock.login(any())).thenAnswer((_) async => testUser);
|
|
121
|
+
Get.put<CometChatService>(mock);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
tearDown(() {
|
|
125
|
+
Get.reset();
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**`Get.reset()`** between tests is critical — GetX's singleton container persists across tests otherwise.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 3. Widget tests
|
|
134
|
+
|
|
135
|
+
```dart
|
|
136
|
+
import 'package:flutter/material.dart';
|
|
137
|
+
import 'package:flutter_test/flutter_test.dart';
|
|
138
|
+
import 'package:mocktail/mocktail.dart';
|
|
139
|
+
import 'package:get/get.dart';
|
|
140
|
+
import 'package:your_app/screens/chat_screen.dart';
|
|
141
|
+
import 'package:your_app/services/cometchat_service.dart';
|
|
142
|
+
|
|
143
|
+
class MockCometChatService extends Mock implements CometChatService {}
|
|
144
|
+
|
|
145
|
+
void main() {
|
|
146
|
+
late MockCometChatService mock;
|
|
147
|
+
|
|
148
|
+
setUp(() {
|
|
149
|
+
Get.reset();
|
|
150
|
+
mock = MockCometChatService();
|
|
151
|
+
when(() => mock.init()).thenAnswer((_) async {});
|
|
152
|
+
when(() => mock.login(any())).thenAnswer((_) async => User(uid: 'cometchat-uid-1', name: 'Alice'));
|
|
153
|
+
Get.put<CometChatService>(mock);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
tearDown(() => Get.reset());
|
|
157
|
+
|
|
158
|
+
testWidgets('shows loading until login resolves', (tester) async {
|
|
159
|
+
final loginCompleter = Completer<User>();
|
|
160
|
+
when(() => mock.login(any())).thenAnswer((_) => loginCompleter.future);
|
|
161
|
+
|
|
162
|
+
await tester.pumpWidget(MaterialApp(home: ChatScreen()));
|
|
163
|
+
await tester.pump(); // start the build
|
|
164
|
+
|
|
165
|
+
expect(find.byType(CircularProgressIndicator), findsOneWidget);
|
|
166
|
+
|
|
167
|
+
loginCompleter.complete(User(uid: 'cometchat-uid-1'));
|
|
168
|
+
await tester.pumpAndSettle();
|
|
169
|
+
|
|
170
|
+
expect(find.byType(CircularProgressIndicator), findsNothing);
|
|
171
|
+
expect(find.text('Conversations'), findsOneWidget);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
testWidgets('shows error when login fails', (tester) async {
|
|
175
|
+
when(() => mock.login(any())).thenThrow(Exception('401 Unauthorized'));
|
|
176
|
+
|
|
177
|
+
await tester.pumpWidget(MaterialApp(home: ChatScreen()));
|
|
178
|
+
await tester.pumpAndSettle();
|
|
179
|
+
|
|
180
|
+
expect(find.textContaining('Unauthorized'), findsOneWidget);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`pumpAndSettle()` waits for animations + Futures to complete.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 4. Mocking CometChat widgets that ship with the kit
|
|
190
|
+
|
|
191
|
+
`CometChatConversations`, `CometChatMessageList`, etc. are real widgets that try to render against a real SDK during tests. Two strategies:
|
|
192
|
+
|
|
193
|
+
### Strategy A — Replace at the import level
|
|
194
|
+
|
|
195
|
+
If your widget composition is small (3-5 CometChat widgets), make them swappable:
|
|
196
|
+
|
|
197
|
+
```dart
|
|
198
|
+
// chat_screen.dart
|
|
199
|
+
class ChatScreen extends StatelessWidget {
|
|
200
|
+
final WidgetBuilder conversationsBuilder;
|
|
201
|
+
|
|
202
|
+
const ChatScreen({this.conversationsBuilder = _defaultConversations});
|
|
203
|
+
|
|
204
|
+
static Widget _defaultConversations(BuildContext context) =>
|
|
205
|
+
const CometChatConversations();
|
|
206
|
+
|
|
207
|
+
@override
|
|
208
|
+
Widget build(BuildContext context) => Scaffold(body: conversationsBuilder(context));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// In tests:
|
|
212
|
+
testWidgets('chat screen renders', (tester) async {
|
|
213
|
+
await tester.pumpWidget(MaterialApp(
|
|
214
|
+
home: ChatScreen(conversationsBuilder: (_) => const Text('mock convo list')),
|
|
215
|
+
));
|
|
216
|
+
expect(find.text('mock convo list'), findsOneWidget);
|
|
217
|
+
});
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Strategy B — Skip widget tests, focus on service tests
|
|
221
|
+
|
|
222
|
+
For larger compositions, test the service layer (which is fully mockable) and rely on integration tests for widget assertions. Pragmatic for v5 because the kit's widgets aren't designed for unit testing.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 5. Integration tests
|
|
227
|
+
|
|
228
|
+
```dart
|
|
229
|
+
// integration_test/chat_test.dart
|
|
230
|
+
import 'package:flutter/material.dart';
|
|
231
|
+
import 'package:flutter_test/flutter_test.dart';
|
|
232
|
+
import 'package:integration_test/integration_test.dart';
|
|
233
|
+
import 'package:your_app/main.dart' as app;
|
|
234
|
+
|
|
235
|
+
void main() {
|
|
236
|
+
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
237
|
+
|
|
238
|
+
testWidgets('login and see conversations', (tester) async {
|
|
239
|
+
app.main();
|
|
240
|
+
await tester.pumpAndSettle(Duration(seconds: 10)); // generous for real SDK init
|
|
241
|
+
|
|
242
|
+
expect(find.text('Welcome'), findsOneWidget);
|
|
243
|
+
|
|
244
|
+
await tester.tap(find.text('Messages'));
|
|
245
|
+
await tester.pumpAndSettle();
|
|
246
|
+
|
|
247
|
+
// Real SDK + real test app: assert that at least one conversation exists
|
|
248
|
+
// (cometchat-uid-1 has pre-seeded conversations with uid-2..5)
|
|
249
|
+
expect(find.byType(ListTile), findsAtLeastNWidgets(1));
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Run on a real device or simulator:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
flutter test integration_test/chat_test.dart
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
For CI:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
flutter test integration_test/chat_test.dart --device-id=emulator-5554
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## 6. Golden tests
|
|
269
|
+
|
|
270
|
+
```dart
|
|
271
|
+
testWidgets('chat bubble renders correctly in light theme', (tester) async {
|
|
272
|
+
await tester.pumpWidget(MaterialApp(
|
|
273
|
+
theme: ThemeData.light(),
|
|
274
|
+
home: Scaffold(
|
|
275
|
+
body: ChatBubble(
|
|
276
|
+
message: TextMessage(text: 'Hello', senderUid: 'alice'),
|
|
277
|
+
),
|
|
278
|
+
),
|
|
279
|
+
));
|
|
280
|
+
|
|
281
|
+
await expectLater(
|
|
282
|
+
find.byType(ChatBubble),
|
|
283
|
+
matchesGoldenFile('goldens/chat_bubble_light.png'),
|
|
284
|
+
);
|
|
285
|
+
});
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
First run:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
flutter test --update-goldens
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Commit the `goldens/` folder. Subsequent runs assert against it.
|
|
295
|
+
|
|
296
|
+
**Gotcha:** golden tests are pixel-perfect; small rendering differences between Flutter versions / OS versions cause failures. Pin Flutter SDK version in CI.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## 7. CI configuration
|
|
301
|
+
|
|
302
|
+
### GitHub Actions
|
|
303
|
+
|
|
304
|
+
```yaml
|
|
305
|
+
name: tests
|
|
306
|
+
on: [push, pull_request]
|
|
307
|
+
|
|
308
|
+
jobs:
|
|
309
|
+
test:
|
|
310
|
+
runs-on: ubuntu-latest
|
|
311
|
+
steps:
|
|
312
|
+
- uses: actions/checkout@v4
|
|
313
|
+
- uses: subosito/flutter-action@v2
|
|
314
|
+
with: { flutter-version: 3.16.0, channel: stable }
|
|
315
|
+
- run: flutter pub get
|
|
316
|
+
- run: flutter test
|
|
317
|
+
env:
|
|
318
|
+
COMETCHAT_TEST_APP_ID: ${{ secrets.TEST_COMETCHAT_APP_ID }}
|
|
319
|
+
COMETCHAT_TEST_REGION: ${{ secrets.TEST_COMETCHAT_REGION }}
|
|
320
|
+
COMETCHAT_TEST_AUTH_KEY: ${{ secrets.TEST_COMETCHAT_AUTH_KEY }}
|
|
321
|
+
|
|
322
|
+
integration:
|
|
323
|
+
runs-on: macos-13
|
|
324
|
+
needs: test
|
|
325
|
+
steps:
|
|
326
|
+
- uses: actions/checkout@v4
|
|
327
|
+
- uses: subosito/flutter-action@v2
|
|
328
|
+
with: { flutter-version: 3.16.0, channel: stable }
|
|
329
|
+
- uses: futureware-tech/simulator-action@v3
|
|
330
|
+
with: { model: "iPhone 15", os: iOS, os_version: "17.0" }
|
|
331
|
+
- run: flutter pub get
|
|
332
|
+
- run: |
|
|
333
|
+
flutter test integration_test/chat_test.dart \
|
|
334
|
+
--dart-define=COMETCHAT_APP_ID=${{ secrets.TEST_COMETCHAT_APP_ID }} \
|
|
335
|
+
--dart-define=COMETCHAT_REGION=${{ secrets.TEST_COMETCHAT_REGION }} \
|
|
336
|
+
--dart-define=COMETCHAT_AUTH_KEY=${{ secrets.TEST_COMETCHAT_AUTH_KEY }}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Codemagic
|
|
340
|
+
|
|
341
|
+
Codemagic is Flutter-native. Add a workflow:
|
|
342
|
+
|
|
343
|
+
```yaml
|
|
344
|
+
workflows:
|
|
345
|
+
test:
|
|
346
|
+
name: Flutter tests
|
|
347
|
+
instance_type: mac_mini_m1
|
|
348
|
+
scripts:
|
|
349
|
+
- name: Get dependencies
|
|
350
|
+
script: flutter pub get
|
|
351
|
+
- name: Run tests
|
|
352
|
+
script: flutter test
|
|
353
|
+
- name: Run integration tests
|
|
354
|
+
script: |
|
|
355
|
+
flutter test integration_test/chat_test.dart \
|
|
356
|
+
--dart-define=COMETCHAT_APP_ID=$COMETCHAT_APP_ID \
|
|
357
|
+
...
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Codemagic's env vars come from the project settings UI.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## 8. Anti-patterns
|
|
365
|
+
|
|
366
|
+
1. **Skipping `Get.reset()`** between tests. GetX singletons persist across tests; "test 2 inherits test 1's state" flakes are common.
|
|
367
|
+
2. **Awaiting `pumpAndSettle()` with no timeout.** Real SDK calls can hang; tests timeout after 30s with no useful error. Pass `Duration(seconds: 10)` explicitly.
|
|
368
|
+
3. **Using `mocktail` without registering all dependencies.** `Get.put` requires every injected service; partial mocks crash with "not registered."
|
|
369
|
+
4. **Hardcoding the Auth Key in test files.** Use `--dart-define` flags. Same rule as production.
|
|
370
|
+
5. **Goldens that depend on system fonts.** They render differently on macOS vs Linux CI. Use `Roboto` (Material default) and pin Flutter SDK version.
|
|
371
|
+
6. **Real WebSocket calls in unit tests.** The CometChat SDK opens a WebSocket on init; if you call real `init` in a unit test, the test slows to seconds and may flake. Mock the service.
|
|
372
|
+
|
|
373
|
+
## 9. Verification checklist
|
|
374
|
+
|
|
375
|
+
- [ ] `CometChatService` abstraction (or similar) wrapping the SDK
|
|
376
|
+
- [ ] `MockCometChatService` in test setup; `Get.put<CometChatService>(mock)` per test
|
|
377
|
+
- [ ] `Get.reset()` in tearDown
|
|
378
|
+
- [ ] At least one widget test for "loading state until login resolves"
|
|
379
|
+
- [ ] At least one widget test for "error UI on init/login failure"
|
|
380
|
+
- [ ] Golden tests for at least one chat surface (light + dark theme)
|
|
381
|
+
- [ ] Integration test in `integration_test/` for the login + see conversations flow
|
|
382
|
+
- [ ] CI separates unit + integration; uses dedicated CometChat test app via `--dart-define`
|
|
383
|
+
- [ ] Flutter SDK version pinned in CI (no "channel: stable" alone)
|
|
384
|
+
|
|
385
|
+
## 10. Pointers
|
|
386
|
+
|
|
387
|
+
- `cometchat-flutter-v5-core` — UIKitSettingsBuilder, init/login order
|
|
388
|
+
- `cometchat-flutter-v5-events` — listener subscription patterns
|
|
389
|
+
- `cometchat-flutter-v5-troubleshooting` — when tests pass but production breaks
|
|
390
|
+
- `cometchat-flutter-v6-testing` — V6 patterns (Bloc-based; different)
|
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-theming
|
|
|
3
3
|
description: "Use when customizing the visual appearance of CometChat Flutter UIKit v5 components. Triggers on CometChatThemeHelper, CometChatColorPalette, CometChatSpacing, CometChatTypography, Style classes, merge()."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_uikit_shared ^5.2.3; flutter >=2.5.0"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-troubleshooting
|
|
|
3
3
|
description: "Use when debugging CometChat Flutter UIKit v5 issues. Symptom-to-cause lookup, verify checks, common errors, drift detection."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15; cometchat_uikit_shared ^5.2.3"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-flutter-v5-users-groups
|
|
|
3
3
|
description: "Use when working with CometChat Flutter UIKit v5 user and group list components. Triggers on CometChatUsers, CometChatGroups, CometChatGroupMembers, CometChatChangeScope."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_uikit_shared ^5.2.3"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -11,7 +11,7 @@ description: >
|
|
|
11
11
|
real-time messages. Use whenever user mentions CometChat or says "chat UI".
|
|
12
12
|
license: "MIT"
|
|
13
13
|
compatibility: "flutter >=2.5.0; dart >=2.17.0; cometchat_chat_uikit 6.0.0-beta2"
|
|
14
|
-
allowed-tools: "
|
|
14
|
+
allowed-tools: "shell, file-read, file-search, file-list, grep"
|
|
15
15
|
metadata:
|
|
16
16
|
author: "CometChat"
|
|
17
17
|
version: "3.0.0"
|