You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('returns "Encrypted_not_available" when channel is not private and E2E is enabled,',()=>{
60
+
const{ result }=renderHook(()=>useEncryptedRoomDescription('channel'),{
61
+
wrapper: mockAppRoot()
62
+
.withSetting('E2E_Enable',true)
63
+
.withDefaultLanguage('pt-BR')
64
+
.withTranslations('pt-BR','core',{
65
+
Encrypted_not_available: 'Indisponível para {{roomType}} público',
66
+
channel: 'canal',
67
+
team: 'equipe',
68
+
})
69
+
.build(),
70
+
});
71
+
constdescribe=result.current;
72
+
73
+
expect(describe({isPrivate: false,encrypted: false})).toBe('Indisponível para canal público');
74
+
});
75
+
76
+
it('returns "Encrypted_not_available" when team is not private and E2E is enabled,',()=>{
77
+
const{ result }=renderHook(()=>useEncryptedRoomDescription('team'),{
78
+
wrapper: mockAppRoot()
79
+
.withSetting('E2E_Enable',true)
80
+
.withDefaultLanguage('pt-BR')
81
+
.withTranslations('pt-BR','core',{
82
+
Encrypted_not_available: 'Indisponível para {{roomType}} público',
83
+
channel: 'canal',
84
+
team: 'equipe',
85
+
})
86
+
.build(),
87
+
});
88
+
constdescribe=result.current;
89
+
90
+
expect(describe({isPrivate: false,encrypted: false})).toBe('Indisponível para equipe público');
91
+
});
92
+
93
+
it('returns "Encrypted_messages" when channel is private and encrypted are true and E2E is enabled',()=>{
94
+
const{ result }=renderHook(()=>useEncryptedRoomDescription('channel'),{
95
+
wrapper: mockAppRoot()
96
+
.withSetting('E2E_Enable',true)
97
+
.withDefaultLanguage('pt-BR')
98
+
.withTranslations('pt-BR','core',{
99
+
// TODO: Improve the portuguese translation with a way to captalize the room type for it to be in the start of the sentence
100
+
Encrypted_messages:
101
+
'Criptografado de ponta a ponta {{roomType}}. A pesquisa não funcionará com {{roomType}} criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
'Criptografado de ponta a ponta canal. A pesquisa não funcionará com canal criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
111
+
);
112
+
});
113
+
114
+
it('returns "Encrypted_messages" when team is private and encrypted are true and E2E is enabled',()=>{
115
+
const{ result }=renderHook(()=>useEncryptedRoomDescription('team'),{
116
+
wrapper: mockAppRoot()
117
+
.withSetting('E2E_Enable',true)
118
+
.withTranslations('pt-BR','core',{
119
+
Encrypted_messages:
120
+
'Criptografado de ponta a ponta {{roomType}}. A pesquisa não funcionará com {{roomType}} criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
'Criptografado de ponta a ponta equipe. A pesquisa não funcionará com equipe criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
0 commit comments