yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * @file        S&OP ActionBarPage component to wrap common methods the team encounter during development
 * @description ActionBarPage class extending e2e's ActionBarPage.
 * All S&OP page objects inherit from our own class (inheriting e2e/libappbase), but we can propose common methods to them.
 * @author      Clarence (clarence.chan@3ds.com)
 * @copyright   Dassault Systèmes
 */
 
// Step description to re-use in spec file to prevent scriptor re-write each time
const stepActionBarPage = {
  clickButton: (buttonName: string): string => `Click action bar page button '${buttonName}'.`,
  clickDropdownAndSelectMenu: (actionBarName: string, menuPath: string): string => `In action bar ${actionBarName}, click button menu ${menuPath}.`,
  verifyButtonDisabled: (buttonName: string, expectedTooltip?: string): string => {
    const finalExpectedTooltip = expectedTooltip ? ` with precondition "${expectedTooltip}"` : '';
    return `Verify action bar page button '${buttonName}' disabled${finalExpectedTooltip}.`;
  },
};
 
export { stepActionBarPage as StepActionBarPage };