|
|
@@ -659,7 +659,10 @@ describe('home learning modules', () => {
|
|
|
harness.fixture.detectChanges();
|
|
|
const coachLinks = Array.from(harness.routeNativeElement?.querySelectorAll('.coach-quick-grid > a') ?? []).map((link) => link.getAttribute('href'));
|
|
|
expect(coachLinks).toEqual(['/pages/home/shop', '/pages/member/ke_xiao', '/pages/his/his', '/pages/member/ke_fuxi']);
|
|
|
- expect(harness.routeNativeElement?.querySelector('.home-header .header-action')?.getAttribute('href')).toBe('/pages/home/ucenter');
|
|
|
+ expect(harness.routeNativeElement?.querySelector('.home-header .header-action')).toBeNull();
|
|
|
+ const coachAccountTab = (Array.from(harness.fixture.nativeElement.querySelectorAll('.tabbar a')) as HTMLAnchorElement[])
|
|
|
+ .find((link) => link.getAttribute('href') === '/pages/home/ucenter');
|
|
|
+ expect(coachAccountTab?.textContent).toContain('我的');
|
|
|
expect(harness.routeNativeElement?.querySelector('.content-section')).toBeNull();
|
|
|
const memoryApi = TestBed.inject(ApiService) as unknown as LearningModulesApiService;
|
|
|
expect(memoryApi.lastMemoryParams).toEqual(jasmine.objectContaining({ uid: 300, pageSize:20 }));
|