Lai,Risheng
2023-11-02 30c02e0c981b16be0918483543f4b812956c45d4
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
55
56
57
58
59
60
61
62
import { ListRow } from '../../e2elib/lib/src/pageobjects/list/listrow.component';
import { ListBase } from '../../libappbase/listbase';
import { ButtonSOP } from '../../libappsop/buttonsop';
import { FormSOP } from '../../libappsop/formsop';
 
export class FormSanityCheck extends FormSOP {
  // Buttons
  public btnRefresh = new ButtonSOP('ButtonRefresh');
 
  // Lists
  public listSanityCheckGroup = new ListSanityCheckGroup();
  public listSanityCheckMessage = new ListSanityCheckMessage();
 
  public constructor() {
    super('FormSanityCheck');
  }
}
 
export class ListSanityCheckGroup extends ListBase {
  public constructor() {
    super('ListSanityCheckGroup');
  }
 
  /**
   * Get SanityCheckGroup row by pass-in SanityCheckGroup name and parent SanityCheckGroup name
   *
   * @param name target SanityCheckGroup name
   * @param parentName parent row SanityCheckGroup name of target SanityCheckGroup
   * @returns row of SanityCheckGroup
   */
  public async getSanityCheckGroupByName(name: string, parentNames?: string[]): Promise<ListRow> {
    return this.getRowByCellValue(ListSanityCheckGroupColumn.Name, name, parentNames);
  }
}
 
export class ListSanityCheckMessage extends ListBase {
  public constructor() {
    super('ListSanityCheckMessage');
  }
 
  /**
   * Return Sanity row that matches the Description given
   *
   * @param displayName target entity Description
   * @param parentNames target entity parent(s) Description
   *
   * @return ListRow that matches the provided Description
   */
  public async getRowByName(description: string, parentNames?: string[]): Promise<ListRow> {
    const listRow = await this.getRowByCellValue(ListSanityCheckMessageColumn.Description, description, parentNames);
    return listRow;
  }
}
 
// List SanityCheckMessage columns
export enum ListSanityCheckMessageColumn {
  Description = 'Description',
}
// List SanityCheckGroup columns
export enum ListSanityCheckGroupColumn {
  Name = 'Name',
}