| /** | 
|  * @file        S&OP Form component to wrap common methods the team encounter during development | 
|  * @description Form class extending libappbase's Form. | 
|  * 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 | 
|  */ | 
| import { ElementFinder } from '../e2elib/node_modules/protractor/built'; | 
| import { QForm } from '../e2elib/lib/api/pageobjects/qform.component'; | 
|   | 
| export class FormSOP extends QForm { | 
|   public constructor(componentPath: string, isCustomPath?: boolean, elementObj?: ElementFinder) { | 
|     super(componentPath, isCustomPath, elementObj); | 
|   } | 
|   | 
|   public async openDockedForm(): Promise<void> { | 
|     // Check if form is close | 
|     if (await this.isOpen(false)) { | 
|       await this.restore(); | 
|     } | 
|     await this.waitUntilPresent(); | 
|   } | 
|  } | 
|   | 
| // Step description to re-use in spec file to prevent scriptor re-write each time | 
| const stepForm = { | 
|   clickPanel: (formName: string, panelName: string): string => `In form "${formName}", click the panel "${panelName}".`, | 
| }; | 
|   | 
| export { stepForm as StepForm }; |