import { ComponentFixture, TestBed } from '@angular/core/testing';
import { provideRouter } from '@angular/router';

import { TabsPage } from './tabs.page';
import { By } from '@angular/platform-browser';

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

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [TabsPage],
      providers: [provideRouter([])]
    }).compileComponents();
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(TabsPage);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
  it('should have daily button', () => {
    const dailyButton = fixture.debugElement.query(By.css('ion-button.daily-button'));
    expect(dailyButton).toBeTruthy(); // 确保“日常”按钮存在
  });

  it('should have companion button', () => {
    const companionButton = fixture.debugElement.query(By.css('ion-button.companion-button'));
    expect(companionButton).toBeTruthy(); // 确保“心灵陪伴”按钮存在
  });
});
