corrige tests para adaptarlos a que ahora no se escribe sin responsable en las respuestas sobre tareas, solo se deja el emoji

main
borja 6 days ago
parent de257cf65f
commit ab832e208b

@ -63,7 +63,7 @@ beforeEach(() => {
// Reset database state between tests (borrar raíz primero; ON DELETE CASCADE limpia assignments)
testDb.exec('DELETE FROM response_queue');
try { testDb.exec('DELETE FROM task_origins'); } catch {}
try { testDb.exec('DELETE FROM task_origins'); } catch { }
testDb.exec('DELETE FROM tasks');
testDb.exec('DELETE FROM users');
testDb.exec('DELETE FROM groups');
@ -854,7 +854,7 @@ describe('WebhookServer', () => {
expect(r.recipient.endsWith('@g.us')).toBe(false);
}
const msg = out.map(x => x.message).join('\n');
expect(msg).toContain('sin responsable');
expect(msg).toContain('🙅');
expect(msg).toContain('… y 2 más');
});
@ -923,7 +923,7 @@ describe('WebhookServer', () => {
expect(out.length).toBeGreaterThan(0);
const msg = out.map(x => x.message).join('\n');
expect(msg).toContain('Tus tareas');
expect(msg).toContain('sin responsable');
expect(msg).toContain('🙅');
expect(msg).toContain('… y 2 más');
});

@ -53,7 +53,7 @@ test('listar grupo por defecto con /t ver en grupo e incluir “… y X más”'
// Debe indicar que hay 2 más (límite 10)
expect(responses[0].message).toContain('… y 2 más');
// Debe mostrar “sin responsable”
expect(responses[0].message).toContain('sin responsable');
expect(responses[0].message).toContain('🙅');
});
test('listar “mis” por defecto en DM con /t ver', async () => {
@ -194,7 +194,7 @@ test('ver sin en grupo activo: solo sin dueño y paginación', async () => {
expect(responses[0].recipient).toBe('1234567890');
const msg = responses[0].message;
expect(msg).toContain('Test Group');
expect(msg).toContain('sin responsable');
expect(msg).toContain('🙅');
expect(msg).toContain('… y 2 más');
expect(msg).not.toContain('Asignada 1');
expect(msg).not.toContain('Asignada 2');
@ -259,7 +259,7 @@ test('ver todos en grupo: “Tus tareas” + “Sin dueño (grupo actual)” con
const msg = responses[0].message;
expect(msg).toContain('Tus tareas');
expect(msg).toContain('Test Group');
expect(msg).toContain('sin responsable');
expect(msg).toContain('🙅');
expect(msg).toContain('… y 2 más'); // paginación en la sección “sin dueño”
});
@ -293,7 +293,7 @@ test('ver todos por DM: “Tus tareas” + nota instructiva para ver sin dueño
});
afterEach(() => {
try { memDb.close(); } catch {}
try { memDb.close(); } catch { }
});
describe('CommandService', () => {

Loading…
Cancel
Save