eletrotupi / tcc/ api/tests/exports/label-map.unit.test.ts82d1a5f43667612a93eade471c7491c813da6c42
3.5 KB | 137 lines Raw
1
import { describe, it, expect } from 'vitest'
2
import {
3
  activityCategoryLabel,
4
  appointmentTypeLabel,
5
  baseMoodLabel,
6
  careActionTypeLabel,
7
  insightPeriodLabel,
8
  insightTypeLabel,
9
  intensityLabel,
10
  medicinePeriodicityLabel,
11
  moodComponentLabel,
12
  notificationKindLabel,
13
  triggerTypeLabel,
14
} from '@app/services/export/label.map'
15

16
describe('export label maps', () => {
17
  it('renders the base mood labels in pt-BR', () => {
18
    expect(baseMoodLabel).toEqual({
19
      SAD: 'Triste',
20
      NEUTRAL: 'Neutro',
21
      GOOD: 'Bem',
22
      GREAT: 'Ótimo',
23
      ANGRY: 'Irritado',
24
    })
25
  })
26

27
  it('renders the mood component labels in pt-BR', () => {
28
    expect(moodComponentLabel).toEqual({
29
      JOY: 'Alegria',
30
      ANGER: 'Raiva',
31
      SADNESS: 'Tristeza',
32
      FEAR: 'Medo',
33
      GUILT: 'Culpa',
34
      FRUSTRATION: 'Frustração',
35
      CALM: 'Calmo',
36
      MOTIVATED: 'Motivado',
37
      TIREDNESS: 'Cansaço',
38
      GRATITUDE: 'Gratidão',
39
      FOCUS: 'Foco',
40
      RESTLESS: 'Inquieto',
41
      RELAXED: 'Relaxado',
42
      OVERWHELMED: 'Sobrecarga',
43
    })
44
  })
45

46
  it('renders the intensity labels in pt-BR', () => {
47
    expect(intensityLabel).toEqual({
48
      LIGHT: 'Suave',
49
      MODERATE: 'Moderada',
50
      HIGH: 'Intensa',
51
    })
52
  })
53

54
  it('renders the trigger type labels in pt-BR', () => {
55
    expect(triggerTypeLabel).toEqual({
56
      SOCIAL: 'Social',
57
      WORK: 'Trabalho',
58
      HEALTH: 'Saúde',
59
      PHYSICAL: 'Físico',
60
      FAMILY: 'Família',
61
      THERAPY: 'Terapia',
62
      INTERNAL: 'Interno',
63
      OTHER: 'Outro',
64
    })
65
  })
66

67
  it('renders the care action type labels in pt-BR', () => {
68
    expect(careActionTypeLabel).toEqual({
69
      MEDICINE: 'Medicação',
70
      APPOINTMENT: 'Consulta',
71
      ACTIVITY: 'Atividade',
72
    })
73
  })
74

75
  it('renders the appointment type labels in pt-BR', () => {
76
    expect(appointmentTypeLabel).toEqual({
77
      ANALYST: 'Analista',
78
      PSYCHIATRIST: 'Psiquiatra',
79
      GP: 'Clínico geral',
80
      NUTRITIONIST: 'Nutricionista',
81
      PHYSIOTHERAPIST: 'Fisioterapeuta',
82
      OTHER: 'Consulta',
83
    })
84
  })
85

86
  it('renders the activity category labels in pt-BR', () => {
87
    expect(activityCategoryLabel).toEqual({
88
      WALK: 'Caminhada',
89
      YOGA: 'Yoga',
90
      GYM: 'Academia',
91
      MEDITATION: 'Meditação',
92
      SOCIAL: 'Momento social',
93
      CREATIVE: 'Atividade criativa',
94
      OTHER: 'Atividade',
95
    })
96
  })
97

98
  it('renders the medicine periodicity labels in pt-BR', () => {
99
    expect(medicinePeriodicityLabel).toEqual({
100
      ONCE: 'Uma vez',
101
      DAILY: 'Diário',
102
      TWICE_DAILY: '2x ao dia',
103
      THREE_TIMES_DAILY: '3x ao dia',
104
      WEEKLY: 'Semanal',
105
      BIWEEKLY: 'Quinzenal',
106
      MONTHLY: 'Mensal',
107
    })
108
  })
109

110
  it('renders the insight type labels in pt-BR', () => {
111
    expect(insightTypeLabel).toEqual({
112
      MOOD_TREND: 'Tendência de Humor',
113
      ENERGY_SLEEP_CORRELATION: 'Sono e Energia',
114
      TRIGGER_PATTERN: 'Padrão de Gatilho',
115
      WEEKLY_SUMMARY: 'Resumo Semanal',
116
      STREAK: 'Sequência',
117
      DAILY_ENERGY: 'Energia do Dia',
118
      DAILY_SLEEP: 'Sono',
119
    })
120
  })
121

122
  it('renders the insight period labels in pt-BR', () => {
123
    expect(insightPeriodLabel).toEqual({
124
      DAILY: 'Diário',
125
      WEEKLY: 'Semanal',
126
      MONTHLY: 'Mensal',
127
    })
128
  })
129

130
  it('renders the notification kind labels in pt-BR', () => {
131
    expect(notificationKindLabel).toEqual({
132
      DAILY_REMINDER: 'Lembrete diário',
133
      MEDICINE_REMINDER: 'Lembrete de medicação',
134
      INSIGHT_ALERT: 'Alerta de indicador',
135
    })
136
  })
137
})