yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { Form } from '../../e2elib/lib/src/pageobjects/form.component';
import { ListSOP } from '../../libappsop/listsop';
import { DialogDummy } from '../dialogs/dialog.dummy';
import { DialogRecipe } from '../dialogs/dialog.recipe';
 
export class FormRecipeDefinition extends Form {
  public listRecipe = new ListRecipe();
  public listRecipeIngredient = new ListRecipeIngredient();
 
  public constructor() {
    super('FormRecipeDefinitions');
  }
}
 
export class ListRecipe extends ListSOP<DialogRecipe, ListRecipeColumn> {
  public constructor() {
    super('ListRecipe', new DialogRecipe());
 
    // Set primary key column name(s), to display in error message when assert fails
    this.rowPrimaryColumnNames = {Name: ''};
    this.rowAllConstraintsColumnName = {'All constraints': ''};
  }
}
 
// Use DialogDummy as not yet automate tests that require the dialog, replace with actual implementation if start automation tests that requires it
export class ListRecipeIngredient extends ListSOP<DialogDummy, ListRecipeIngredientColumn> {
  public constructor() {
    super('ListRecipeIngredient', new DialogDummy());
 
    // Set primary key column name(s), to display in error message when assert fails
    this.rowPrimaryColumnNames = {'Display name': ''};
  }
}
 
export interface ListRecipeColumn {
  'All constraints'?: string;
  Name?: string;
  Description?: string;
}
 
const listRecipeContextMenuItem = {
  Create: { ContextMenu: 'listContextMenuRecipe', Name: 'MenuCreate', Label: 'Create' },
  CreateRecipeIngredient: { ContextMenu: 'listContextMenuRecipe', Name: 'MenuCreateRecipeIngredient', Label: 'Create recipe ingredients' },
  Edit: { ContextMenu: 'listContextMenuRecipe', Name: 'MenuEdit', Label: 'Edit' },
};
 
export { listRecipeContextMenuItem as ListRecipeContextMenuItem };
 
export interface ListRecipeIngredientColumn {
  'Display name'?: string;
  Minimum?: string;
  Maximum?: string;
  Nominal?: string;
}