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
/**
 * Object with all fail output messages
 */
const logMessage = {
  btn_isEnabled: (btnName: string): string => `${btnName} button should be disabled.`,
  btn_notDisabled: (btnName: string, tooltip?: string): string => `${btnName} button should be disabled. ${tooltip ? `Disabled with tooltip: ${tooltip}` : ''}`,
  btn_NotEnabled: (btnName: string): string => `${btnName} button should be enabled`,
  btn_notClickable: (btnName: string, tooltip?: string): string => `${btnName} button should be clickable. ${tooltip ? `Disabled with tooltip: ${tooltip}` : ''}`,
  cell_incorrectValue: (expected: string, actual: string, colName: string, rowValue: string): string =>
    `Expect cell value of column: ${colName} and row: ${rowValue} to be ${expected} but getting ${actual}`,
  checkbox_isChecked: (cbName: string): string => `${cbName} checkbox should be unchecked.`,
  checkbox_isDisabled: (cbName: string): string => `${cbName} checkbox should be enabled.`,
  checkbox_isEnabled: (cbName: string): string => `${cbName} checkbox should be disabled.`,
  checkbox_notChecked: (cbName: string): string => `${cbName} checkbox should be checked.`,
  checkbox_notVisible: (cbName: string): string => `${cbName} checkbox should be visible.`,
  column_allValuesNotMatched: (colName: string, colVal: string, listName: string[]): string => `All cell values in column ${colName} in ${listName} list should be '${colVal}'.`,
  column_found: (value: string): string => `Column with header ${value} should not be found.`,
  column_notFound: (value: string): string => `Column with header ${value} should be found.`,
  column_notSorted: (colName: string, listName: string, sortDirection: string): string => `Column ${colName} in ${listName} list should be sorted ${sortDirection}`,
  contextMenu_notVisible: (): string => 'Context menu should be visible',
  ddl_isDisabled: (ddlName: string): string => `${ddlName} drop down list should be enabled.`,
  ddl_isEnabled: (ddlName: string): string => `${ddlName} drop down list should be disabled.`,
  ddl_incorrectSelection: (ddlName: string, expectedValue: string): string => `${expectedValue} to be selected in ${ddlName} dropdown`,
  dialog_isVisible: (dlgName: string): string => `${dlgName} dialog should be hidden`,
  dialog_notVisible: (dlgName: string): string => `${dlgName} dialog should be visible`,
  dts_isDisabled: (dtsName: string): string => `${dtsName} date time selector should be enabled.`,
  dts_isEnabled: (dtsName: string): string => `${dtsName} date time selector should be disabled.`,
  edt_isDisabled: (edtName: string): string => `${edtName} edit text field should be enabled.`,
  edt_isEnabled: (edtName: string): string => `${edtName} edit text field should be disabled.`,
  form_notVisible: (formName: string): string => `${formName} form should be visible.`,
  list_checkboxChecked: (listName: string): string => `${listName} list checkbox should not be checked.`,
  list_checkboxNotChecked: (listName: string): string => `${listName} list checkbox should be checked.`,
  list_columnNotExist: (columnName: string, listName: string): string => `${columnName} column should be shown in ${listName}`,
  list_dragAndDropAllowed: (tooltip: string): string => `Drag and drop should not be allowed with tooltip "${tooltip}"`,
  list_dragAndDropNotAllowed: (dragValue: string, dropValue: string): string => `${dragValue} should be allow to drag and drop on ${dropValue}`,
  list_minRowCountNotMatch: (listName: string, minRowCount: string): string => `There should be at least ${minRowCount} row(s) in ${listName} list`,
  list_isVisible: (listName: string): string => `${listName} list should not be visible.`,
  list_notVisible: (listName: string): string => `${listName} list should be visible.`,
  menu_isChecked: (menuItemName: string): string => `${menuItemName} menu item should be unchecked`,
  menu_isEnabled: (menuItemName: string): string => `${menuItemName} menu item should be disabled.`,
  menu_notChecked: (menuItemName: string): string => `${menuItemName} menu item should be checked`,
  menu_notClickable: (menuItemName: string, tooltip?: string): string => `${menuItemName} menu item should be clickable. ${tooltip ? `Disabled with tooltip: ${tooltip}` : ''}`,
  optimizer_timeout: (timeInSeconds: number): string => `Optimizer is not completed in specified timeframe (${timeInSeconds} seconds). Check if it needs longer timeout duration.`,
  row_checkboxNotChecked: (rowName: string): string => `${rowName} row checkbox should be checked`,
  row_found: (values: string[]): string => `Row with values ${values.join(', ')} should not be found.`,
  row_notCreated: (values: string[]): string => `New row with values ${values.join(', ')} should be created.`,
  row_notFound: (value: string): string => `Row with values ${value} should be found.`,
  tooltip_notMatched: (expected: string, actual: string): string => `Expect tooltip value to be ${expected} but getting ${actual}.`,
  view_notVisible: (viewName: string): string => `${viewName} view should be visible.`,
  value_isMatched: (ori: string, current: string): string => `Current value "${current}" is expected to be different from original value "${ori}"`,
  value_notMatched: (expected: string, actual: string): string => `Expect value to be ${expected} but getting ${actual}`,
};
 
export { logMessage as LogMessage };