/**
|
* S&OP interface for UI element that has following behaviors:
|
* - Receives user input to set into component
|
* - Verify component value is as user expected value
|
* S&OP custom page objects in libappsop (e.g dialogsop, editfieldsop) implements this interface so that
|
* reusable logic can be centralized instead of spec files (and page objects) re-implementing the logic over and over.
|
*/
|
export interface UIActionSOP {
|
clickActionLinkText(expectedActionLinkText: string): Promise<void>;
|
getValueString(): Promise<string>; // cannot use getValue() as numberpicker uses getValue()
|
setValue(value?: string): Promise<void>;
|
toggleValue?(): Promise<void>;
|
verifyBatchEditEnabled(expectedEnabled: boolean, expectedActionLinkText: string): Promise<void>;
|
verifyTooltip(expectedValue: string): Promise<void>;
|
verifyEnabled(expectedValue: boolean, expectedDisabledTooltip?: string): Promise<void>;
|
verifyHasMaskError(expectedValue: boolean): Promise<void>;
|
verifyValue(expectedValue?: string): Promise<void>;
|
verifyVisible(expectedValue?: string): Promise<void>;
|
}
|
|
/**
|
* S&OP interface for UI element that needs to wait for other elements to be loaded.
|
* For example: View that has multiple forms thus need wait for them present.
|
*/
|
export interface UIWaitSOP {
|
/**
|
* Navigate web UI to open view (waiting for UI loaded to be handled via separate method waitUILoaded.
|
* Making this optional for now so that other views not impacted, BUT future to refactor all views to
|
* must implement this and we can then safely remove the optional (?).
|
*/
|
openView?(): Promise<void>;
|
|
/**
|
* Wait UI loaded (e.g for view waiting its forms to be present)
|
*/
|
waitUILoaded(): Promise<void>;
|
}
|