filtered deleted messages from search and chat view, refactored chat bubble styling for deleted comments, and updated tests
This commit is contained in:
@@ -105,28 +105,38 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('reaction and poll_voted system messages are filtered out', () {
|
||||
final response = _response([
|
||||
_msg(
|
||||
id: 1,
|
||||
timestamp: 100,
|
||||
message: 'Treffer',
|
||||
systemMessage: 'reaction',
|
||||
type: GetRoomResponseObjectMessageType.system,
|
||||
),
|
||||
_msg(
|
||||
id: 2,
|
||||
timestamp: 200,
|
||||
message: 'Treffer',
|
||||
systemMessage: 'poll_voted',
|
||||
type: GetRoomResponseObjectMessageType.system,
|
||||
),
|
||||
_msg(id: 3, timestamp: 300, message: 'Treffer'),
|
||||
]);
|
||||
final matches = ChatSearchController.findMatches(response, 'Treffer');
|
||||
expect(matches.length, 1);
|
||||
expect(matches.first.messageId, 3);
|
||||
});
|
||||
test(
|
||||
'reaction, poll_voted and message_deleted system messages are filtered out',
|
||||
() {
|
||||
final response = _response([
|
||||
_msg(
|
||||
id: 1,
|
||||
timestamp: 100,
|
||||
message: 'Treffer',
|
||||
systemMessage: 'reaction',
|
||||
type: GetRoomResponseObjectMessageType.system,
|
||||
),
|
||||
_msg(
|
||||
id: 2,
|
||||
timestamp: 200,
|
||||
message: 'Treffer',
|
||||
systemMessage: 'poll_voted',
|
||||
type: GetRoomResponseObjectMessageType.system,
|
||||
),
|
||||
_msg(
|
||||
id: 4,
|
||||
timestamp: 250,
|
||||
message: 'Treffer',
|
||||
systemMessage: 'message_deleted',
|
||||
type: GetRoomResponseObjectMessageType.system,
|
||||
),
|
||||
_msg(id: 3, timestamp: 300, message: 'Treffer'),
|
||||
]);
|
||||
final matches = ChatSearchController.findMatches(response, 'Treffer');
|
||||
expect(matches.length, 1);
|
||||
expect(matches.first.messageId, 3);
|
||||
},
|
||||
);
|
||||
|
||||
test('rich object parameters are searchable (e.g. file names)', () {
|
||||
final response = _response([
|
||||
|
||||
Reference in New Issue
Block a user