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

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

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

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

  it('应该创建组件', () => {
    expect(component).toBeTruthy();
  });

  it('应该包含侧边栏', () => {
    const sidebar = fixture.nativeElement.querySelector('.sidebar');
    expect(sidebar).toBeTruthy();
  });

  it('应该包含内容区域', () => {
    const contentArea = fixture.nativeElement.querySelector('.content-area');
    expect(contentArea).toBeTruthy();
  });

  it('应该包含轮播图', () => {
    const swiper = fixture.nativeElement.querySelector('.swiper-container');
    expect(swiper).toBeTruthy();
  });

  it('应该包含功能模块卡片', () => {
    const cards = fixture.nativeElement.querySelectorAll('.module-card');
    expect(cards.length).toBeGreaterThan(0);
  });
});