Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

Tests: es email snapshot and audit-log greetings (PR 1911)

Janikef5b3ed40a37
diff --git a/apps/api/src/emails/__snapshots__/templates.test.ts.snap b/apps/api/src/emails/__snapshots__/templates.test.ts.snap
index 155548b8..40430c62 100644
--- a/apps/api/src/emails/__snapshots__/templates.test.ts.snap
+++ b/apps/api/src/emails/__snapshots__/templates.test.ts.snap
@@ -1435,7 +1435,7 @@ La grabación está en Linedesk.
--
-Recibes un correo por cada llamada a Brightwater Plumbing & Heating. Change email notifications: https://desk.example.com/#assistant/emails?ws=ws_demo
+Recibes un correo por cada llamada a Brightwater Plumbing & Heating. Cambiar las notificaciones por correo: https://desk.example.com/#assistant/emails?ws=ws_demo
Linedesk · desk.example.com
",
@@ -1464,7 +1464,7 @@ La grabación y la transcripción están en Linedesk.
--
-Recibes un correo por cada llamada a Brightwater Plumbing & Heating. Change email notifications: https://desk.example.com/#assistant/emails?ws=ws_demo
+Recibes un correo por cada llamada a Brightwater Plumbing & Heating. Cambiar las notificaciones por correo: https://desk.example.com/#assistant/emails?ws=ws_demo
Linedesk · desk.example.com
",
@@ -1609,7 +1609,7 @@ La grabación está en Linedesk.
--
-A partir de ahora recibes un correo por cada llamada a Brightwater Plumbing & Heating. Change email notifications: https://desk.example.com/#assistant/emails?ws=ws_demo
+A partir de ahora recibes un correo por cada llamada a Brightwater Plumbing & Heating. Cambiar las notificaciones por correo: https://desk.example.com/#assistant/emails?ws=ws_demo
Linedesk · desk.example.com
",
@@ -1818,13 +1818,13 @@ Brightwater Plumbing & Heating usó el 80 % de su límite de gasto mensual
Brightwater Plumbing & Heating usó unos 40,20 US$ de su límite de gasto mensual de 50,00 US$ (80 %, estimado).
-Once it reaches the cap, your assistant stops answering calls until 30 de noviembre: callers hear that you’ll call them back.
+Cuando llegue al límite, tu asistente dejará de contestar llamadas hasta el 30 de noviembre: quienes llaman oyen que les devolverás la llamada.
-To raise the cap, ask your server admin.
+Para subir el límite, pídeselo a tu administrador del servidor.
--
-You got this email because you own Brightwater Plumbing & Heating.
+Recibes este correo porque eres propietario de Brightwater Plumbing & Heating.
Linedesk · desk.example.com
",
@@ -1838,16 +1838,16 @@ Brightwater Plumbing & Heating usó el 80 % de su límite de gasto mensual
Brightwater Plumbing & Heating usó unos 40,20 US$ de su límite de gasto mensual de 50,00 US$ (80 %, estimado).
-When it reaches the cap, its assistant stops answering calls until 1 de diciembre (UTC): callers hear that the business will call them back, and each call shows up in the inbox as a missed call to return.
+Cuando llegue al límite, su asistente dejará de contestar llamadas hasta el 1 de diciembre (UTC): quienes llaman oyen que el negocio les devolverá la llamada, y cada llamada aparece en la bandeja de entrada como una llamada perdida por devolver.
-Change the cap:
+Cambiar el límite:
https://desk.example.com/#admin/workspaces/ws_brightwater
-The workspace owner got an email too, asking them to contact you.
+El propietario del espacio de trabajo también recibió un correo en el que se le pide que te contacte.
--
-You got this email because you are a server admin of desk.example.com.
+Recibes este correo porque eres administrador del servidor de desk.example.com.
Linedesk · desk.example.com
",
@@ -1859,13 +1859,13 @@ Linedesk · desk.example.com
Brightwater Plumbing & Heating alcanzó su límite de gasto mensual
-Until 30 de noviembre, your assistant no longer answers calls. Callers hear that you’ll call them back, and each call shows up in your inbox as a missed call with “Call back”.
+Hasta el 30 de noviembre, tu asistente ya no contesta llamadas. Quienes llaman oyen que les devolverás la llamada, y cada llamada aparece en tu bandeja de entrada como una llamada perdida con “Devolver la llamada”.
-Your workspace has a spending cap of 50,00 US$ a month (estimated cost this month: about 50,35 US$). Buying minutes doesn’t lift it: write to [email protected] if calls should be answered before 30 de noviembre.
+Tu espacio de trabajo tiene un límite de gasto de 50,00 US$ al mes (costo estimado este mes: unos 50,35 US$). Comprar minutos no lo levanta: escribe a [email protected] si las llamadas deben contestarse antes del 30 de noviembre.
--
-You got this email because you own Brightwater Plumbing & Heating.
+Recibes este correo porque eres propietario de Brightwater Plumbing & Heating.
Linedesk · desk.example.com
",
@@ -1877,13 +1877,13 @@ Linedesk · desk.example.com
Brightwater Plumbing & Heating alcanzó su límite de gasto mensual
-Until 30 de noviembre, your assistant no longer answers calls. Callers hear that you’ll call them back, and each call shows up in your inbox as a missed call with “Call back”.
+Hasta el 30 de noviembre, tu asistente ya no contesta llamadas. Quienes llaman oyen que les devolverás la llamada, y cada llamada aparece en tu bandeja de entrada como una llamada perdida con “Devolver la llamada”.
-Your server admin set this cap at 50,00 US$ a month (estimated cost this month: about 50,35 US$). Ask them to raise it if calls should be answered before 30 de noviembre.
+Tu administrador del servidor fijó este límite en 50,00 US$ al mes (costo estimado este mes: unos 50,35 US$). Pídele que lo suba si las llamadas deben contestarse antes del 30 de noviembre.
--
-You got this email because you own Brightwater Plumbing & Heating.
+Recibes este correo porque eres propietario de Brightwater Plumbing & Heating.
Linedesk · desk.example.com
",
@@ -1897,16 +1897,16 @@ Brightwater Plumbing & Heating alcanzó su límite de gasto mensual
Brightwater Plumbing & Heating alcanzó su límite de gasto mensual de 50,00 US$ (costo estimado este mes: unos 50,35 US$).
-Until 1 de diciembre (UTC) its assistant no longer answers calls: callers hear that the business will call them back, and each call shows up in the inbox as a missed call with “Call back”. Test calls are off too.
+Hasta el 1 de diciembre (UTC), su asistente ya no contesta llamadas: quienes llaman oyen que el negocio les devolverá la llamada, y cada llamada aparece en la bandeja de entrada como una llamada perdida con “Devolver la llamada”. Las llamadas de prueba también están desactivadas.
-Raise the cap:
+Subir el límite:
https://desk.example.com/#admin/workspaces/ws_brightwater
-The workspace owner got an email too, asking them to contact you.
+El propietario del espacio de trabajo también recibió un correo en el que se le pide que te contacte.
--
-You got this email because you are a server admin of desk.example.com.
+Recibes este correo porque eres administrador del servidor de desk.example.com.
Linedesk · desk.example.com
",
@@ -2043,7 +2043,7 @@ https://desk.example.com/#call/call_demo_01?ws=ws_demo
--
-Recibes este correo porque un compañero de Brightwater Plumbing & Heating te asignó una llamada. Cámbialo en Configuración de usuario › Notificaciones: https://desk.example.com/#account/preferences?ws=ws_demo
+Recibes este correo porque un compañero de Brightwater Plumbing & Heating te asignó una llamada. Cámbialo en Configuración de usuario › Preferencias: https://desk.example.com/#account/preferences?ws=ws_demo
Linedesk · desk.example.com
",
@@ -2501,15 +2501,15 @@ Linedesk · desk.example.com
Tu prueba gratuita de Linedesk ya empezó
-Nothing is charged today.
+Hoy no se cobra nada.
Primer cobro: 1 de diciembre de 2026
-Importe: 11,00 US$, then every month. Plus tax where it applies.
+Importe: 11,00 US$, y luego cada mes. Más impuestos donde correspondan.
Correos de recordatorio: 7 días y 1 día antes del primer cobro
-Calls beyond the included minutes are paid from your balance. You can buy minutes or turn on auto-recharge in Settings › Billing (https://desk.example.com/#workspace/billing?ws=ws_demo).
+Las llamadas que superen los minutos incluidos se pagan con tu saldo. Puedes comprar minutos o activar la recarga automática en Configuración › Facturación (https://desk.example.com/#workspace/billing?ws=ws_demo).
-¿No es para ti? Cancela antes del 1 de diciembre de 2026 y no pagas nada. Son dos clics en Configuración › Facturación, sin necesidad de llamar.
+¿No es para ti? Cancela antes del 1 de diciembre de 2026 y no pagas nada.
Administrar mi plan:
https://desk.example.com/#workspace/billing?ws=ws_demo
@@ -2532,11 +2532,11 @@ Linedesk · desk.example.com
Tu prueba gratuita de Linedesk termina en 7 días
Primer cobro: 1 de diciembre de 2026
-Importe: 11,00 US$, then every month. Plus tax where it applies.
+Importe: 11,00 US$, y luego cada mes. Más impuestos donde correspondan.
-Calls beyond the included minutes are paid from your balance. You can buy minutes or turn on auto-recharge in Settings › Billing (https://desk.example.com/#workspace/billing?ws=ws_demo).
+Las llamadas que superen los minutos incluidos se pagan con tu saldo. Puedes comprar minutos o activar la recarga automática en Configuración › Facturación (https://desk.example.com/#workspace/billing?ws=ws_demo).
-¿No es para ti? Cancela antes del 1 de diciembre de 2026 y no pagas nada. Son dos clics en Configuración › Facturación, sin necesidad de llamar.
+¿No es para ti? Cancela antes del 1 de diciembre de 2026 y no pagas nada.
Administrar mi plan:
https://desk.example.com/#workspace/billing?ws=ws_demo
@@ -2559,11 +2559,11 @@ Linedesk · desk.example.com
Tu prueba gratuita de Linedesk termina mañana
Primer cobro: 1 de diciembre de 2026
-Importe: 11,00 US$, then every month. Plus tax where it applies.
+Importe: 11,00 US$, y luego cada mes. Más impuestos donde correspondan.
-Calls beyond the included minutes are paid from your balance. You can buy minutes or turn on auto-recharge in Settings › Billing (https://desk.example.com/#workspace/billing?ws=ws_demo).
+Las llamadas que superen los minutos incluidos se pagan con tu saldo. Puedes comprar minutos o activar la recarga automática en Configuración › Facturación (https://desk.example.com/#workspace/billing?ws=ws_demo).
-¿No es para ti? Cancela antes del 1 de diciembre de 2026 y no pagas nada. Son dos clics en Configuración › Facturación, sin necesidad de llamar.
+¿No es para ti? Cancela antes del 1 de diciembre de 2026 y no pagas nada.
Administrar mi plan:
https://desk.example.com/#workspace/billing?ws=ws_demo
@@ -2631,7 +2631,7 @@ Linedesk · desk.example.com
Se canceló tu plan de Linedesk
-Your plan ended on 23 de noviembre de 2026. Calls are no longer answered.
+Tu plan terminó el 23 de noviembre de 2026. Las llamadas ya no se contestan.
Tus números de teléfono se conservan hasta el 23 de diciembre de 2026. Para quedarte con un número, pórtalo a otro operador antes de esa fecha: en Configuración › Facturación están los datos para la portabilidad. Después de esa fecha, los números se liberan.
diff --git a/apps/api/test/audit-log.test.ts b/apps/api/test/audit-log.test.ts
index 4f0dc4dc..403aa09f 100644
--- a/apps/api/test/audit-log.test.ts
+++ b/apps/api/test/audit-log.test.ts
@@ -11,6 +11,10 @@ import { commands, user as users } from '@linedesk/db'
import { and, eq } from 'drizzle-orm'
import { act, addMember, createWorkspace } from './helpers.ts'
+// Every greeting here keeps the recording sentence of the default one: one that drops it is a recording notice
+// change (LIN-819, kind team), which these tests are not about.
+const NOTICE = 'This call may be recorded and transcribed.'
+
describe('setup link entries', () => {
test('an assistant.update through the setup MCP is listed under integrations, with viaSetupKey', async () => {
const ws = await createWorkspace('Brightwater Plumbing & Heating')
@@ -27,13 +31,21 @@ describe('setup link entries', () => {
expect(actor).not.toBeNull()
const ran = await runAction(
'assistant.update',
- { assistantId: ws.assistant.id, greeting: 'Thanks for calling Brightwater Plumbing & Heating, this is Maya.' },
+ {
+ assistantId: ws.assistant.id,
+ greeting: `Thanks for calling Brightwater Plumbing & Heating, this is Maya. ${NOTICE}`,
+ },
actor!,
)
expect(ran.status).toBe(200)
// The same action by the owner in the app is everyday work, not audited.
expect(
- (await act(ws.owner, 'assistant.update', { assistantId: ws.assistant.id, greeting: 'Hi, this is Maya.' })).status,
+ (
+ await act(ws.owner, 'assistant.update', {
+ assistantId: ws.assistant.id,
+ greeting: `Hi, this is Maya. ${NOTICE}`,
+ })
+ ).status,
).toBe(200)
const integrations = await listAudit(db, { kind: 'integrations', workspaceId: ws.id, limit: 50 })
@@ -74,7 +86,12 @@ describe('transfer contacts', () => {
// Saving the same list again, or other settings, changes no contact: not listed.
expect((await update([sarah])).status).toBe(200)
expect(
- (await act(ws.owner, 'assistant.update', { assistantId: ws.assistant.id, greeting: 'Hi, this is Maya.' })).status,
+ (
+ await act(ws.owner, 'assistant.update', {
+ assistantId: ws.assistant.id,
+ greeting: `Hi, this is Maya. ${NOTICE}`,
+ })
+ ).status,
).toBe(200)
const { entries } = await listAudit(db, { kind: 'integrations', workspaceId: ws.id, limit: 50 })
@@ -209,7 +226,12 @@ describe('call email rules', () => {
// The same rules again, or other settings: no change, not listed.
expect((await update([rule('books', [sarah.userId])])).body.data?.emailRoutingChanges).toBeUndefined()
expect(
- (await act(ws.owner, 'assistant.update', { assistantId: ws.assistant.id, greeting: 'Hi, this is Maya.' })).status,
+ (
+ await act(ws.owner, 'assistant.update', {
+ assistantId: ws.assistant.id,
+ greeting: `Hi, this is Maya. ${NOTICE}`,
+ })
+ ).status,
).toBe(200)
// Only the wording changed: listed, with nobody added or removed.
expect((await update([rule('all books', [sarah.userId])])).status).toBe(200)