| import { ViewBase } from '../../libappbase/viewbase'; | 
| import { ButtonProductsContextMenuItem } from '../actionbarpages/abp.data'; | 
| import { AppMP } from '../appmp'; | 
| import { FormIngredient } from '../forms/form.ingredient'; | 
| import { FormRecipeAssignment } from '../forms/form.recipeassignment'; | 
| import { FormRecipeDefinition } from '../forms/form.recipedefinition'; | 
|   | 
| export class ViewRecipes extends ViewBase { | 
|   public readonly name = 'View Recipes'; | 
|   public readonly viewPath = 'Data > Products > Recipes'; | 
|   | 
|   public formIngredient = new FormIngredient(); | 
|   public formRecipeDefinition = new FormRecipeDefinition(); | 
|   public formRecipeAssignment = new FormRecipeAssignment(); | 
|   | 
|   public async switchTo(): Promise<void> { | 
|     const appMP = AppMP.getInstance(); | 
|   | 
|     await appMP.abpData.isVisible(); | 
|     // Open Data action bar page | 
|     await appMP.abpData.click(); | 
|     // Click on Recipes submenu in Products context menu | 
|     await appMP.abpData.btnProducts.clickDropdownAndSelectMenu(ButtonProductsContextMenuItem.Recipes); | 
|     // Wait until form present | 
|     await this.formIngredient.waitUntilPresent(); | 
|     await this.formRecipeDefinition.waitUntilPresent(); | 
|     await this.formRecipeAssignment.waitUntilPresent(); | 
|   } | 
| } |