-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreatePutawayTable.ts
More file actions
50 lines (38 loc) · 987 Bytes
/
CreatePutawayTable.ts
File metadata and controls
50 lines (38 loc) · 987 Bytes
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
import { Locator, Page } from '@playwright/test';
import BasePageModel from '@/pages/BasePageModel';
class CreatePutawayTable extends BasePageModel {
constructor(page: Page) {
super(page);
}
get table() {
return this.page.getByTestId('wizardPage').getByRole('grid');
}
get rows() {
return this.table.getByRole('rowgroup');
}
row(index: number) {
return new Row(this.page, this.rows.nth(index));
}
}
class Row extends BasePageModel {
row: Locator;
constructor(page: Page, row: Locator) {
super(page);
this.row = row;
}
get checkbox() {
return this.row.getByRole('checkbox');
}
getExpandBinLocation(binLocation: string) {
return this.row
.getByTestId('table-cell')
.getByText(binLocation);
}
get receivingBin() {
return this.row.getByTestId('table-cell');
}
getProductName(name: string) {
return this.row.getByTestId('table-cell').getByText(name);
}
}
export default CreatePutawayTable;