@@ -240,4 +240,10 @@ describe('appointment workflow screens',()=>{
expect(component.feedbackError()).toContain('已被更新');expect(component.submitting()).toBeFalse();expect(component.feedbackSaved()).toBeFalse();
});
+ it('opens the editor when entering details from a report edit link',async()=>{
+ order={...order,dszt:30,allowedActions:['editFeedback'],feedback:{contentSummary:'原内容',trainingSummary:'进度',noHomework:true,revision:'2026-10-13T00:00:00Z'}};
+ const {component}=await screen('/pages/shop/get_order?id=901&editReport=1');
+ expect(component.completionDialog()?.nativeElement.open).toBeTrue();expect(component.contentSummary).toBe('原内容');
+ });
+
@@ -84,7 +84,7 @@ export class AppointmentPageComponent implements OnInit, OnDestroy {
const dialog = this.completionDialog()?.nativeElement;
if (dialog && !this.autoEditOpened && this.can('editFeedback') && this.feedback() && this.route.snapshot.queryParamMap.get('editReport') === '1') { this.autoEditOpened = true; this.openFeedbackEditor(); }
if (dialog && !this.isStudentView && !this.order()['cancelled'] && this.can('complete') && this.route.snapshot.queryParamMap.get('feedback') === '1') dialog.showModal();
- });
+ }, { allowSignalWrites: true });
}
ngOnInit(): void {