Preserve activity row layout changes
This commit is contained in:
@@ -73,10 +73,24 @@ void main() {
|
||||
of: find.byKey(const Key('chat-turn-activity')),
|
||||
matching: find.byType(Text),
|
||||
);
|
||||
expect(
|
||||
tester.getTopLeft(activity.first).dx,
|
||||
tester.getTopLeft(find.text('First paragraph.')).dx,
|
||||
final activityTextRect = tester.getRect(activity.first);
|
||||
final answerTextRect = tester.getRect(find.text('First paragraph.'));
|
||||
expect(activityTextRect.left, closeTo(answerTextRect.left, 0.5));
|
||||
|
||||
final activityRect = tester.getRect(
|
||||
find.byKey(const Key('chat-turn-activity')),
|
||||
);
|
||||
final activityContentRect = tester.getRect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('chat-turn-activity')),
|
||||
matching: find.byType(Row),
|
||||
),
|
||||
);
|
||||
expect(activityTextRect.left - activityRect.left, closeTo(8, 0.5));
|
||||
expect(activityContentRect.left - activityRect.left, closeTo(8, 0.5));
|
||||
expect(activityContentRect.top - activityRect.top, closeTo(8, 0.5));
|
||||
expect(activityRect.right - activityContentRect.right, closeTo(8, 0.5));
|
||||
expect(activityRect.bottom - activityContentRect.bottom, closeTo(8, 0.5));
|
||||
});
|
||||
|
||||
testWidgets('a finished reply copies its answer text ($style)', (
|
||||
|
||||
Reference in New Issue
Block a user