import { ActionBarPage } from '../../e2elib/lib/src/pageobjects/actionbarpage.component';
|
import { ButtonSOP } from '../../libappsop/buttonsop';
|
import { FormPostponementSettings } from '../forms/form.postponementsettings';
|
|
export class ActionBarPageSales extends ActionBarPage {
|
// Views
|
public btnSalesSegments = new ButtonSOP('ButtonSalesSalesSegments');
|
public btnForecasts = new ButtonSOP('ButtonSalesForecasts');
|
public btnCustomerOrders = new ButtonSOP('ButtonSalesCustomerOrders');
|
|
// Create edit delete buttons
|
public btnCreate = new ButtonSOP('ButtonSalesCreate');
|
public btnEdit = new ButtonSOP('ButtonSalesEdit');
|
public btnDelete = new ButtonSOP('ButtonSalesDelete');
|
// Forecasts and customer orders buttons
|
public btnAdjustQuantity = new ButtonSOP('ButtonSalesAdjustQuantity');
|
public btnPostponeForecast = new ButtonSOP('ButtonSalesPostpone');
|
|
// Toggle right docked forms
|
public btnFulfillmentTarget = new ButtonSOP('ButtonFulfillmentTargets');
|
public btnPostponementSettings = new ButtonSOP('ButtonPostponementSettings');
|
|
// Right docked forms
|
public formPostponementSettings = new FormPostponementSettings();
|
|
public constructor() {
|
super('ActionBarPageSales');
|
}
|
|
/**
|
* Toggle show right docked Postponement Settings form.
|
*
|
* @param show True to show, false to hide.
|
*/
|
public async toggleShowPostponementSettings(show: boolean): Promise<void> {
|
if (show !== await this.formPostponementSettings.isOpen()) {
|
await this.btnPostponementSettings.click();
|
}
|
}
|
}
|
|
// Step description to re-use in spec file to prevent scriptor re-write each time
|
const stepActionBarSales = {
|
hidePostponementSettingsRightDockedPanel: (): string => 'Click on action bar button Postponement Settings to hide right docked panel.',
|
showPostponementSettingsRightDockedPanel: (): string => 'Click on action bar button Postponement Settings to display right docked panel.',
|
};
|
|
export { stepActionBarSales as StepActionBarSales };
|