|
|
@@ -632,6 +632,16 @@ describe('home learning modules', () => {
|
|
|
expect(router.url).toContain('/pages/stu/stu_con');
|
|
|
expect(harness.routeNativeElement?.querySelectorAll('.repeat-list > button').length).toBe(1);
|
|
|
expect(harness.routeNativeElement?.querySelector('.readonly-word-header')).toBeNull();
|
|
|
+
|
|
|
+ await harness.navigateByUrl('/pages/stu/pl_stu5?nids=811&pnid=801');
|
|
|
+ await harness.fixture.whenStable();
|
|
|
+ harness.fixture.detectChanges();
|
|
|
+ const spellingActions = harness.routeNativeElement?.querySelector('.teacher-spelling-actions') as HTMLElement;
|
|
|
+ expect(spellingActions.querySelectorAll('button').length).toBe(3);
|
|
|
+ expect(spellingActions.textContent).toContain('跳过并完成');
|
|
|
+ (spellingActions.querySelectorAll('button')[1] as HTMLButtonElement).click();
|
|
|
+ harness.fixture.detectChanges();
|
|
|
+ expect(harness.routeNativeElement?.textContent).toContain('拼写完成');
|
|
|
});
|
|
|
|
|
|
it('counts words marked as known as completed and persists them for the student', async () => {
|