Skip to content

Commit caf8118

Browse files
authored
Merge pull request #71 from openboxes/OBPIH-7536
OBPIH-7536 Putaway - split line
2 parents 24b8d98 + 727302c commit caf8118

File tree

8 files changed

+383
-1
lines changed

8 files changed

+383
-1
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ LOCATION_SUPPLIER_ALT=locationId
1515
LOCATION_DEPOT=locationId
1616
LOCATION_NO_PICK_AND_PUTAWAY_STOCK_DEPOT=locationId
1717
LOCATION_INTERNAL=locationId
18+
LOCATION_INTERNAL_TWO=locationId
1819
LOCATION_WARD=locationId
1920
PRODUCT_ONE=productId
2021
PRODUCT_TWO=productId

.github/workflows/playwright.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
LOCATION_WARD: ${{ secrets.LOCATION_WARD }}
6969
LOCATION_NO_PICK_AND_PUTAWAY_STOCK_DEPOT: ${{ secrets.LOCATION_NO_PICK_AND_PUTAWAY_STOCK_DEPOT }}
7070
LOCATION_INTERNAL: ${{ secrets.LOCATION_INTERNAL }}
71+
LOCATION_INTERNAL_TWO: ${{ secrets.LOCATION_INTERNAL_TWO }}
7172
PRODUCT_ONE: ${{ secrets.PRODUCT_ONE }}
7273
PRODUCT_TWO: ${{ secrets.PRODUCT_TWO }}
7374
PRODUCT_THREE: ${{ secrets.PRODUCT_THREE }}

src/config/AppConfig.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export enum LOCATION_KEY {
2626
WARD = 'ward',
2727
NO_PICK_AND_PUTAWAY_STOCK = 'noPickAndPutawayStockDepot',
2828
BIN_LOCATION = 'internalLocation',
29+
BIN_LOCATION2 = 'internalLocation2',
2930
}
3031

3132
export enum PRODUCT_KEY {
@@ -270,6 +271,19 @@ class AppConfig {
270271
type: LocationTypeCode.BIN_LOCATION,
271272
parentLocation: env.get('LOCATION_MAIN').required().asString(),
272273
}),
274+
275+
internalLocation2: new LocationConfig({
276+
id: env.get('LOCATION_INTERNAL_TWO').asString(),
277+
key: LOCATION_KEY.BIN_LOCATION,
278+
name: this.uniqueIdentifier.generateUniqueString('bin-location2'),
279+
requiredActivityCodes: new Set([
280+
ActivityCode.PICK_STOCK,
281+
ActivityCode.PUTAWAY_STOCK,
282+
]),
283+
required: false,
284+
type: LocationTypeCode.BIN_LOCATION,
285+
parentLocation: env.get('LOCATION_MAIN').required().asString(),
286+
}),
273287
};
274288

275289
this.products = {

src/fixtures/fixtures.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ type Fixtures = {
9292
wardLocationService: LocationData;
9393
noPickAndPutawayStockDepotService: LocationData;
9494
internalLocationService: LocationData;
95+
internalLocation2Service: LocationData;
96+
9597
// PRODUCT DATA
9698
mainProductService: ProductData;
9799
otherProductService: ProductData;
@@ -179,6 +181,8 @@ export const test = baseTest.extend<Fixtures>({
179181
use(new LocationData(LOCATION_KEY.NO_PICK_AND_PUTAWAY_STOCK, page.request)),
180182
internalLocationService: async ({ page }, use) =>
181183
use(new LocationData(LOCATION_KEY.BIN_LOCATION, page.request)),
184+
internalLocation2Service: async ({ page }, use) =>
185+
use(new LocationData(LOCATION_KEY.BIN_LOCATION2, page.request)),
182186
// PRODUCTS
183187
mainProductService: async ({ page }, use) =>
184188
use(new ProductData(PRODUCT_KEY.ONE, page.request)),

src/pages/putaway/components/CompletePutawayTable.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CompletePutawayTable extends BasePageModel {
1212
}
1313

1414
get rows() {
15-
return this.table.getByRole('rowgroup');
15+
return this.table.getByRole('row');
1616
}
1717

1818
row(index: number) {
@@ -27,6 +27,10 @@ class Row extends BasePageModel {
2727
super(page);
2828
this.row = row;
2929
}
30+
31+
getputawayBin(rowIndex: number) {
32+
return this.row.getByTestId(`cell-${rowIndex}-undefined`).nth(9);
33+
}
3034
}
3135

3236
export default CompletePutawayTable;

src/pages/putaway/components/SplitModalTable.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ class Row extends BasePageModel {
4747
get quantityField() {
4848
return this.row.getByRole('cell').getByTestId('quantity-input');
4949
}
50+
51+
get clearBinSelect() {
52+
return this.row.locator('.react-select__clear-indicator');
53+
}
54+
55+
get putawayBinField() {
56+
return this.row.getByTestId('bin-select').getByRole('textbox');
57+
}
5058
}
5159

5260
export default SplitModalTable;

src/pages/putaway/components/StartPutawayTable.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ class Row extends BasePageModel {
6262
get quantityField() {
6363
return this.row.getByTestId('cell-0-quantity').getByRole('spinbutton');
6464
}
65+
66+
get splitLineinPutawayBin() {
67+
return this.row.getByTestId('cell-0-putawayBin');
68+
}
6569
}
6670

6771
export default StartPutawayTable;

0 commit comments

Comments
 (0)