refactor(event): replace bootstrap notices with claimed notices

This commit is contained in:
2026-09-16 08:19:28 -03:00
parent f87f7f55a9
commit 4923010afb
5 changed files with 41 additions and 144 deletions

View File

@@ -3,8 +3,8 @@ import { TestBed, getTestBed } from '@angular/core/testing';
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
import { afterEach, beforeAll, describe, expect, it, vi } from 'vitest';
import { EventDateNotice } from '../../../core/services/event-date-notice.service';
import { MODAL_DATA, ModalRef } from '../../../core/services/modal.service';
import { TenantEventDateNotice } from '../../../core/services/tenant.interface';
import { EventDateNoticeModalComponent } from './event-date-notice-modal.component';
describe('EventDateNoticeModalComponent', () => {
@@ -22,8 +22,9 @@ describe('EventDateNoticeModalComponent', () => {
it('renders the precalculated message and emphasizes its marked parts', async () => {
const close = vi.fn();
const data: TenantEventDateNotice = {
const data: EventDateNotice = {
type: 'rescheduled',
change_ids: [1, 2],
title: 'FECHAS REPROGRAMADAS!',
message: [
{ text: 'Las fechas del ', bold: false },
@@ -48,7 +49,7 @@ describe('EventDateNoticeModalComponent', () => {
expect(element.querySelector('h2')?.textContent).toContain(data.title);
expect(
[...element.querySelectorAll('strong')].map((strong) => strong.textContent?.trim()),
[...element.querySelectorAll('b')].map((strong) => strong.textContent?.trim()),
).toEqual(['09 y 10 de Octubre de 2026', 'respectivamente']);
element.querySelector('button')?.click();