feat(app): diffs colour added lines and +N green, removed lines and -N red
This commit is contained in:
@@ -94,10 +94,11 @@ void main() {
|
||||
final context = tester.element(find.byType(Scaffold));
|
||||
final add = diffLineColors(context, ChangeLineKind.add);
|
||||
final remove = diffLineColors(context, ChangeLineKind.remove);
|
||||
expect(add.background, isNull);
|
||||
expect(remove.background, isNull);
|
||||
// Additions are green and removals red, each line on a light tint.
|
||||
expect(add.background, isNotNull);
|
||||
expect(remove.background, isNotNull);
|
||||
expect(add.text, isNot(remove.text), reason: '$brightness text');
|
||||
expect(add.text, Theme.of(context).colorScheme.primary);
|
||||
expect(add.text.g, greaterThan(add.text.r), reason: 'green addition');
|
||||
expect(remove.text, Theme.of(context).colorScheme.error);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user