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
31
32
33
34
35
36
37
38
39
import { ActionBarPage } from '../../e2elib/lib/src/pageobjects/actionbarpage.component';
import { DialogResetPlan } from '../dialogs/dialog.resetplan';
import { DataResetPlanRadioButtonValues } from '../data/data.supplyplanning';
import { ButtonSOP } from '../../libappsop/buttonsop';
 
enum ActionBarPagePlanContextMenuItem {
  ResetAll = 'MenuResetAll',
}
 
export class ActionBarPagePlan extends ActionBarPage {
  // Context menu item
  public static contextMenuItem = ActionBarPagePlanContextMenuItem;
 
  // Buttons
  public btnCreate = new ButtonSOP('ButtonSupplyPlanningCreate');
  public btnEdit = new ButtonSOP('ButtonSupplyPlanningEdit');
  public btnDelete = new ButtonSOP('ButtonSupplyPlanningDelete');
 
  public btnSupplyPlanning = new ButtonSOP('ButtonSupplyPlanning');
  public btnProductionPlan = new ButtonSOP('ButtonProductionPlan');
  public btnTripPlan = new ButtonSOP('ButtonPlanTripPlan');
  public btnPurchasingPlan = new ButtonSOP('ButtonPlanPurchasingPlan');
  public btnBlendingPlan = new ButtonSOP('ButtonPlanBlendingPlan');
  public btnCampaign = new ButtonSOP('ButtonCampaign');
  public btnFeedback = new ButtonSOP('ButtonFeedback');
  private readonly _btnResetPlan = new ButtonSOP('ButtonSupplyPlanningReset', 'ContextMenuSupplyPlanningReset');
  private readonly _dialogResetPlan = new DialogResetPlan();
 
  public constructor() {
    super('ActionBarPagePlan');
  }
 
  public async resetPlanAll(): Promise<void> {
    await this._btnResetPlan.clickDropdownAndSelectMenu(ActionBarPagePlanContextMenuItem.ResetAll);
    await this._dialogResetPlan.waitUntilPresent();
    await this._dialogResetPlan.rbResetPlan.checkOnRadioButton(DataResetPlanRadioButtonValues.ResetAll);
    await this._dialogResetPlan.clickOK();
  }
}