import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PageCrmSystem } from './page-crm-system';

describe('PageCrmSystem', () => {
  let component: PageCrmSystem;
  let fixture: ComponentFixture<PageCrmSystem>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [PageCrmSystem]
    }).compileComponents();

    fixture = TestBed.createComponent(PageCrmSystem);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });

  it('should initialize with government tab active', () => {
    expect(component.activeTab).toBe('government');
  });

  it('should change active tab', () => {
    component.changeTab('university');
    expect(component.activeTab).toBe('university');
  });

  it('should correctly identify active tab', () => {
    component.activeTab = 'public';
    expect(component.isActive('public')).toBeTrue();
    expect(component.isActive('government')).toBeFalse();
  });
});