Merge pull request 'feat(tests)' (#876) from misha/eatvio_app:main into main

Reviewed-on: eatvio/eatvio_app#876
This commit is contained in:
2026-01-28 09:44:50 +00:00
78 changed files with 4501 additions and 133 deletions

View File

@@ -19,6 +19,25 @@ void main() {
expect(PrefsKeys.marketingBottomSheetHasBeenShown.name, 'marketingBottomSheetHasBeenShown');
expect(PrefsKeys.isEmailVerificationSkipped.name, 'isEmailVerificationSkipped');
});
test('can be compared', () {
expect(PrefsKeys.hasAnonymousTokenBeenSent == PrefsKeys.hasAnonymousTokenBeenSent, true);
expect(PrefsKeys.hasAnonymousTokenBeenSent == PrefsKeys.welcomeScreenWasShowed, false);
});
test('has correct index', () {
expect(PrefsKeys.hasAnonymousTokenBeenSent.index, 0);
expect(PrefsKeys.welcomeScreenWasShowed.index, 1);
expect(PrefsKeys.registrationDate.index, 2);
expect(PrefsKeys.marketingBottomSheetHasBeenShown.index, 3);
});
test('can access by name', () {
expect(PrefsKeys.values.byName('hasAnonymousTokenBeenSent'), PrefsKeys.hasAnonymousTokenBeenSent);
expect(PrefsKeys.values.byName('welcomeScreenWasShowed'), PrefsKeys.welcomeScreenWasShowed);
expect(PrefsKeys.values.byName('registrationDate'), PrefsKeys.registrationDate);
expect(PrefsKeys.values.byName('marketingBottomSheetHasBeenShown'), PrefsKeys.marketingBottomSheetHasBeenShown);
});
});
}