Lai,Risheng
2023-11-02 30c02e0c981b16be0918483543f4b812956c45d4
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
import { ViewBase } from '../../libappbase/viewbase';
import { ButtonParametersContextMenuItem } from '../actionbarpages/abp.data';
import { AppMP } from '../appmp';
import { FormCurrency } from '../forms/form.currency';
import { FormCurrencyRate } from '../forms/form.currencyrate';
import { FormCurrencyRateChart } from '../forms/form.currencyratechart';
 
/**
 * Data > Parameters > Currencies view.
 */
export class ViewCurrency extends ViewBase {
  public readonly name = 'View Currencies definitions';
  public readonly viewPath = 'Data > Parameters > Currencies';
 
  // Forms
  public formCurrency = new FormCurrency();
  public formCurrencyRate = new FormCurrencyRate();
  public formCurrencyRateChart = new FormCurrencyRateChart();
 
  public async switchTo(): Promise<void> {
    const appMP = AppMP.getInstance();
 
    // wait until abp Data is visible
    await appMP.abpData.isVisible();
    // Open Data action bar page
    await appMP.abpData.click();
    // Click on the Parameters button and select Currencies from dropdown
    await appMP.abpData.btnParameters.clickDropdownAndSelectMenu(ButtonParametersContextMenuItem.Currencies);
    // Wait until forms in view are present
    await this.formCurrency.waitUntilPresent();
    await this.formCurrencyRate.waitUntilPresent();
    await this.formCurrencyRateChart.waitUntilPresent();
  }
}