|
| 1 | +import 'package:flutter_test/flutter_test.dart'; |
| 2 | +import 'package:flutter/material.dart'; |
| 3 | +import 'package:taskwarrior/app/utils/constants/palette.dart'; |
| 4 | +import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; |
| 5 | + |
| 6 | +void main() { |
| 7 | + group('TaskWarriorColors', () { |
| 8 | + test('should contain the correct normal colors', () { |
| 9 | + expect(TaskWarriorColors.red, Colors.red); |
| 10 | + expect(TaskWarriorColors.green, Colors.green); |
| 11 | + expect(TaskWarriorColors.yellow, Colors.yellow); |
| 12 | + expect(TaskWarriorColors.white, Colors.white); |
| 13 | + expect(TaskWarriorColors.black, Colors.black); |
| 14 | + expect(TaskWarriorColors.grey, Colors.grey); |
| 15 | + expect(TaskWarriorColors.lightGrey, Colors.grey[600]); |
| 16 | + expect(TaskWarriorColors.purple, Colors.purple); |
| 17 | + expect(TaskWarriorColors.borderColor, Colors.grey.shade300); |
| 18 | + expect(TaskWarriorColors.deepPurpleAccent, Colors.deepPurpleAccent); |
| 19 | + expect(TaskWarriorColors.deepPurple, Colors.deepPurple); |
| 20 | + }); |
| 21 | + |
| 22 | + test('should contain the correct dark theme colors', () { |
| 23 | + expect( |
| 24 | + TaskWarriorColors.kprimaryBackgroundColor, Palette.kToDark.shade200); |
| 25 | + expect(TaskWarriorColors.ksecondaryBackgroundColor, |
| 26 | + const Color.fromARGB(255, 48, 46, 46)); |
| 27 | + expect(TaskWarriorColors.kprimaryTextColor, Colors.white); |
| 28 | + expect(TaskWarriorColors.ksecondaryTextColor, Colors.white); |
| 29 | + expect( |
| 30 | + TaskWarriorColors.kprimaryDisabledTextColor, const Color(0xff595f6b)); |
| 31 | + expect(TaskWarriorColors.kdialogBackGroundColor, |
| 32 | + const Color.fromARGB(255, 25, 25, 25)); |
| 33 | + }); |
| 34 | + |
| 35 | + test('should contain the correct light theme colors', () { |
| 36 | + expect(TaskWarriorColors.kLightPrimaryBackgroundColor, Colors.white); |
| 37 | + expect(TaskWarriorColors.kLightSecondaryBackgroundColor, |
| 38 | + const Color.fromARGB(255, 220, 216, 216)); |
| 39 | + expect(TaskWarriorColors.kLightPrimaryTextColor, Colors.black); |
| 40 | + expect(TaskWarriorColors.kLightSecondaryTextColor, |
| 41 | + const Color.fromARGB(255, 48, 46, 46)); |
| 42 | + expect(TaskWarriorColors.kLightPrimaryDisabledTextColor, |
| 43 | + const Color(0xffACACAB)); |
| 44 | + expect(TaskWarriorColors.kLightDialogBackGroundColor, Colors.white); |
| 45 | + }); |
| 46 | + }); |
| 47 | +} |
0 commit comments