limj
2023-10-24 93652435728de839582440eefd5122c281181d35
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
40
41
42
import { ViewBase } from '../../libappbase/viewbase';
import { UIWaitSOP } from '../../libappsop/objectsop';
import { AppMP } from '../appmp';
import { FormAccount } from '../forms/form.account';
 
/**
 * Scenarios > Accounts view.
 */
export class ViewAccount extends ViewBase implements UIWaitSOP {
  public readonly name = 'Accounts (template)';
  public readonly viewPath = 'Scenarios > Accounts';
 
  public frmAccount = new FormAccount();
 
  /**
   * Switch to account view
   */
  public async switchTo(): Promise<void> {
    const appMP = AppMP.getInstance();
 
    // wait until abp scenario is visible
    await appMP.abpScenario.isVisible();
    // Open scenario action bar page
    await appMP.abpScenario.click();
    // Click account button on the abp
    await appMP.abpScenario.btnAccounts.click();
 
    await this.waitUILoaded();
  }
 
  public async waitUILoaded(): Promise<void> {
    // Wait until form stocking account exist
    await this.frmAccount.waitUntilPresent();
  }
}
 
export enum AccountCostType {
  General = 'General fixed costs',
  Maintenance = 'Maintenance cost',
  Labor = 'Labor cost',
  Changeover = 'Changeover cost',
}