import { TestBed } from '@angular/core/testing';
import { AdminFooter } from './footer';

describe('AdminFooter', () => {
  beforeEach(async () => {
    await TestBed.configureTestingModule({ imports: [AdminFooter] }).compileComponents();
  });

  function render(): HTMLElement {
    const fixture = TestBed.createComponent(AdminFooter);
    fixture.detectChanges();
    return fixture.nativeElement as HTMLElement;
  }

  it('renders the APF copyright with the current year', () => {
    const root = render();
    const copy = root.querySelector('.copyright')?.textContent ?? '';
    expect(copy).toContain('APF France handicap');
    expect(copy).toContain(String(new Date().getFullYear()));
  });

  it('renders the "Admin surface" tag as a persistent visual reminder', () => {
    const root = render();
    expect(root.querySelector('.surface-tag')?.textContent?.trim()).toBe('Admin surface');
  });
});
