yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { ViewBase } from '../../libappbase/viewbase';
import { UIWaitSOP } from '../../libappsop/objectsop';
import { AppMP } from '../appmp';
import { FormOperationFeedback } from '../forms/form.operationfeedback';
import { FormTripFeedback } from '../forms/form.tripfeedback';
 
/**
 * Plan > Feedback view which shows trip and operation feedback.
 */
export class ViewFeedback extends ViewBase implements UIWaitSOP {
  public readonly name = 'Feedback';
  public readonly viewPath = 'Plan > Feedback';
 
  public formOperationFeedback = new FormOperationFeedback();
  public formTripFeedback = new FormTripFeedback();
 
  public async switchTo(): Promise<void> {
    const appMP = AppMP.getInstance();
 
    await appMP.abpPlan.click();
    await appMP.abpPlan.btnFeedback.click();
 
    await this.waitUILoaded();
  }
 
  public async waitUILoaded(): Promise<void> {
    await this.formOperationFeedback.waitUntilPresent();
    await this.formTripFeedback.waitUntilPresent();
  }
}