Skip to content

Commit 00db912

Browse files
committed
add improvements after review
1 parent 2e4a2a8 commit 00db912

4 files changed

Lines changed: 16 additions & 17 deletions

File tree

src/pages/putaway/CreatePutawayPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CreatePutawayPage extends BasePageModel {
4949
.nth(1);
5050
}
5151

52-
get includeLinesInPedningPutawayFilter() {
52+
get includeLinesInPendingPutawayFilter() {
5353
return this.page.getByRole('listitem').filter({ hasText: 'Include' });
5454
}
5555

src/pages/putaway/components/CreatePutawayTable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Row extends BasePageModel {
3838
.getByText(binLocation);
3939
}
4040

41-
getproductName(name: string) {
41+
getProductName(name: string) {
4242
return this.row.getByTestId('table-cell').getByText(name);
4343
}
4444
}

src/pages/transactions/TransactionListPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class TransactionListPage extends BasePageModel {
1515
return this.page.locator('.message');
1616
}
1717

18-
async getDeleteTransaction(n: number) {
18+
async deleteTransaction(n: number) {
1919
await this.table.row(n).actionsButton.click();
2020
await this.table.deleteButton.click();
2121
await expect(this.page.locator('.message')).toBeVisible();

src/tests/putaway/putawayMoreThan1Item.test.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ test.describe('Create putaway for more than 1 item, separate putaways', () => {
7070
}) => {
7171
await navbar.configurationButton.click();
7272
await navbar.transactions.click();
73-
await transactionListPage.getDeleteTransaction(1);
74-
await transactionListPage.getDeleteTransaction(1);
75-
await transactionListPage.getDeleteTransaction(1);
76-
await transactionListPage.getDeleteTransaction(1);
73+
for (let n = 1; n < 4; n++) {
74+
await transactionListPage.deleteTransaction(1);
75+
}
7776
await stockMovementShowPage.goToPage(STOCK_MOVEMENT.id);
7877
await stockMovementShowPage.detailsListTable.oldViewShipmentPage.click();
7978
await oldViewShipmentPage.undoStatusChangeButton.click();
@@ -121,10 +120,10 @@ test.describe('Create putaway for more than 1 item, separate putaways', () => {
121120
.getExpandBinLocation(receivingBin)
122121
.click();
123122
await expect(
124-
createPutawayPage.table.row(1).getproductName(product.name)
123+
createPutawayPage.table.row(1).getProductName(product.name)
125124
).toBeVisible();
126125
await expect(
127-
createPutawayPage.table.row(2).getproductName(product2.name)
126+
createPutawayPage.table.row(2).getProductName(product2.name)
128127
).toBeVisible();
129128
await createPutawayPage.table.row(1).checkbox.click();
130129
await createPutawayPage.startPutawayButton.click();
@@ -146,16 +145,16 @@ test.describe('Create putaway for more than 1 item, separate putaways', () => {
146145
await test.step('Change default fileting on create putaway page to include lines in pending putaways', async () => {
147146
await createPutawayPage.goToPage();
148147
await createPutawayPage.linesInPendingPutawayFilter.click();
149-
await createPutawayPage.includeLinesInPedningPutawayFilter.click();
148+
await createPutawayPage.includeLinesInPendingPutawayFilter.click();
150149
await createPutawayPage.table
151150
.row(0)
152151
.getExpandBinLocation(receivingBin)
153152
.click();
154153
await expect(
155-
createPutawayPage.table.row(1).getproductName(product2.name)
154+
createPutawayPage.table.row(1).getProductName(product2.name)
156155
).toBeVisible();
157156
await expect(
158-
createPutawayPage.table.row(2).getproductName(product.name)
157+
createPutawayPage.table.row(2).getProductName(product.name)
159158
).toBeVisible();
160159
await expect(createPutawayPage.table.row(2).checkbox).toBeDisabled();
161160
});
@@ -193,7 +192,7 @@ test.describe('Create putaway for more than 1 item, separate putaways', () => {
193192
.getExpandBinLocation(receivingBin)
194193
.click();
195194
await expect(
196-
createPutawayPage.table.row(1).getproductName(product2.name)
195+
createPutawayPage.table.row(1).getProductName(product2.name)
197196
).toBeVisible();
198197
await createPutawayPage.table.row(1).checkbox.click();
199198
await createPutawayPage.startPutawayButton.click();
@@ -303,8 +302,8 @@ test.describe('Putaway 2 items in the same putaway', () => {
303302
}) => {
304303
await navbar.configurationButton.click();
305304
await navbar.transactions.click();
306-
await transactionListPage.getDeleteTransaction(1);
307-
await transactionListPage.getDeleteTransaction(1);
305+
await transactionListPage.deleteTransaction(1);
306+
await transactionListPage.deleteTransaction(1);
308307
await stockMovementShowPage.goToPage(STOCK_MOVEMENT.id);
309308
await stockMovementShowPage.detailsListTable.oldViewShipmentPage.click();
310309
await oldViewShipmentPage.undoStatusChangeButton.click();
@@ -351,10 +350,10 @@ test.describe('Putaway 2 items in the same putaway', () => {
351350
.getExpandBinLocation(receivingBin)
352351
.click();
353352
await expect(
354-
createPutawayPage.table.row(1).getproductName(product.name)
353+
createPutawayPage.table.row(1).getProductName(product.name)
355354
).toBeVisible();
356355
await expect(
357-
createPutawayPage.table.row(2).getproductName(product2.name)
356+
createPutawayPage.table.row(2).getProductName(product2.name)
358357
).toBeVisible();
359358
await createPutawayPage.table.row(1).checkbox.click();
360359
await createPutawayPage.table.row(2).checkbox.click();

0 commit comments

Comments
 (0)