import 'package:flutter_test/flutter_test.dart';
import 'package:rasadyar_chicken/data/common/fa_user_role.dart';
import 'package:rasadyar_chicken/presentation/routes/routes.dart';

void main() {
  group('getFaUserRole', () {
    test('returns correct Farsi role for known roles and unknown/null', () {
      expect(getFaUserRole('Admin'), 'ادمین استان');
      expect(getFaUserRole('Poultry'), 'مرغدار');
      expect(getFaUserRole('ProvinceFinancial'), 'مالی اتحادیه');
      expect(getFaUserRole('SuperAdmin'), 'ادمین کل');
      expect(getFaUserRole('UnknownRole'), 'نامشخص');
      expect(getFaUserRole(null), 'نامشخص');
    });
  });

  group('getFaUserRoleWithOnTap', () {
    test('returns correct map for known roles and unknown/null', () {
      expect(getFaUserRoleWithOnTap('Admin'), {'ادمین استان': null});
      expect(getFaUserRoleWithOnTap('Steward'), {'مباشر': ChickenRoutes.initSteward});
      expect(getFaUserRoleWithOnTap('PoultryScience'), {'کارشناس طیور': ChickenRoutes.initPoultryScience});
      expect(getFaUserRoleWithOnTap('UnknownRole'), {'نامشخص': null});
      expect(getFaUserRoleWithOnTap(null), {'نامشخص': null});
    });
  });
}