chore: migrate and update tests.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-06-20 14:43:13 +05:30
committed by xsahil03x
parent 84b50fc852
commit c6f64fdc96
25 changed files with 311 additions and 412 deletions
+6 -6
View File
@@ -46,7 +46,7 @@ Matcher isSameMessageAs(
Message targetMessage, {
bool matchText = false,
bool matchReactions = false,
bool matchSendingStatus = false,
bool matchMessageState = false,
bool matchAttachments = false,
bool matchAttachmentsUploadState = false,
bool matchParentId = false,
@@ -55,7 +55,7 @@ Matcher isSameMessageAs(
targetMessage: targetMessage,
matchText: matchText,
matchReactions: matchReactions,
matchSendingStatus: matchSendingStatus,
matchMessageState: matchMessageState,
matchAttachments: matchAttachments,
matchAttachmentsUploadState: matchAttachmentsUploadState,
matchParentId: matchParentId,
@@ -66,7 +66,7 @@ class _IsSameMessageAs extends Matcher {
required this.targetMessage,
this.matchText = false,
this.matchReactions = false,
this.matchSendingStatus = false,
this.matchMessageState = false,
this.matchAttachments = false,
this.matchAttachmentsUploadState = false,
this.matchParentId = false,
@@ -75,7 +75,7 @@ class _IsSameMessageAs extends Matcher {
final Message targetMessage;
final bool matchText;
final bool matchReactions;
final bool matchSendingStatus;
final bool matchMessageState;
final bool matchAttachments;
final bool matchAttachmentsUploadState;
final bool matchParentId;
@@ -90,8 +90,8 @@ class _IsSameMessageAs extends Matcher {
if (matchText) {
matches &= message.text == targetMessage.text;
}
if (matchSendingStatus) {
matches &= message.status == targetMessage.status;
if (matchMessageState) {
matches &= message.state == targetMessage.state;
}
if (matchReactions) {
matches &= const ListEquality().equals(