diff --git a/src/components/FormField.ts b/src/components/FormField.ts index 0e4508d..54f8896 100644 --- a/src/components/FormField.ts +++ b/src/components/FormField.ts @@ -12,9 +12,22 @@ class FormField extends BasePageModel { this.root = root ?? this.page.locator('body'); } + async hasError() { + return ( + (await this.field.getAttribute('class'))?.includes('has-error') || + (await this.field.getAttribute('data-testid'))?.includes('has-errors') + ); + } + + get fieldWithError() { + return this.root.locator( + `div[data-testid="form-field has-errors"][aria-label="${this.fieldName}"]` + ); + } + get field() { return this.root.locator( - `div[data-testid="form-field"][aria-label="${this.fieldName}"]` + `div[data-testid^="form-field"][aria-label="${this.fieldName}"]` ); } @@ -23,15 +36,19 @@ class FormField extends BasePageModel { } get tooltip() { - return this.page.getByRole('tooltip'); + return this.page.locator('.tippy-tooltip-content'); } async assertHasError() { - await expect(this.field).toHaveClass(/has-error/); + expect(await this.hasError()).toBeTruthy(); + } + + async assertFieldWithErrorIsVisible(error: string) { + await expect(this.fieldWithError).toContainText(error); } async assertHasNoError() { - await expect(this.field).not.toHaveClass(/has-error/); + expect(await this.hasError()).toBeFalsy(); } } diff --git a/src/pages/inbound/create/components/AddItemsTable.ts b/src/pages/inbound/create/components/AddItemsTable.ts index 83a5522..94429bd 100644 --- a/src/pages/inbound/create/components/AddItemsTable.ts +++ b/src/pages/inbound/create/components/AddItemsTable.ts @@ -117,7 +117,7 @@ class Row extends BasePageModel { if (!_.isNil(rowValues.expirationDate)) { await test.step('Assert value in expiry date field', async () => { await expect(this.expirationDate.textbox).toHaveValue( - formatDate(rowValues.expirationDate as Date) + formatDate(rowValues.expirationDate as Date, 'DD/MMM/YYYY') ); }); } diff --git a/src/pages/inbound/create/steps/AddItemsStep.ts b/src/pages/inbound/create/steps/AddItemsStep.ts index 311644a..dc6bd0d 100644 --- a/src/pages/inbound/create/steps/AddItemsStep.ts +++ b/src/pages/inbound/create/steps/AddItemsStep.ts @@ -96,6 +96,11 @@ class AddItemsStep extends BasePageModel { }); } } + + async waitForNetworkIdle() { + // eslint-disable-next-line playwright/no-networkidle + await this.page.waitForLoadState('networkidle'); + } } export default AddItemsStep; diff --git a/src/pages/inbound/create/steps/SendStep.ts b/src/pages/inbound/create/steps/SendStep.ts index 6dec9ae..7d0c828 100644 --- a/src/pages/inbound/create/steps/SendStep.ts +++ b/src/pages/inbound/create/steps/SendStep.ts @@ -15,7 +15,7 @@ class SendStep extends BasePageModel { shipmentTypeSelect: Select; shipDateDatePicker: DatePicker; expectedDeliveryDatePicker: DatePicker; - originField: TextField; + originField: Select; trackingNumberField: TextField; driverNameField: TextField; commentField: TextField; @@ -34,7 +34,7 @@ class SendStep extends BasePageModel { page, 'Expected Delivery Date' ); - this.originField = new TextField(page, 'Origin'); + this.originField = new Select(page, 'Origin'); this.trackingNumberField = new TextField(page, 'Tracking Number'); this.driverNameField = new TextField(page, 'Driver Name'); this.commentField = new TextField(page, 'Comments'); @@ -65,12 +65,12 @@ class SendStep extends BasePageModel { getDocuments(documentName: string) { return this.page - .locator('.dropdown-content') + .locator('.dropdown-item') .getByText(documentName, { exact: true }); } async isLoaded() { - await expect(this.originField.textbox).toBeVisible(); + await expect(this.originField.selectField).toBeVisible(); await expect(this.destinationSelect.selectField).toBeVisible(); await expect(this.shipmentTypeSelect.selectField).toBeVisible(); await expect(this.shipDateDatePicker.textbox).toBeVisible(); diff --git a/src/pages/putaway/steps/StartStep.ts b/src/pages/putaway/steps/StartStep.ts index 6f77162..9cec2a8 100644 --- a/src/pages/putaway/steps/StartStep.ts +++ b/src/pages/putaway/steps/StartStep.ts @@ -47,7 +47,7 @@ class StartStep extends BasePageModel { } async closeDisplayedError() { - return this.page.locator('.alert-close-icon').click(); + return this.page.locator('.alert-close-icon').first().click(); } } diff --git a/src/tests/inbound/createInbound/createInbound.test.ts b/src/tests/inbound/createInbound/createInbound.test.ts index 4968b5d..061c87a 100644 --- a/src/tests/inbound/createInbound/createInbound.test.ts +++ b/src/tests/inbound/createInbound/createInbound.test.ts @@ -126,6 +126,9 @@ test.describe('Create inbound stock movement', () => { await test.step('Remove second item', async () => { await createInboundPage.addItemsStep.table.row(1).deleteButton.click(); + await createInboundPage.addItemsStep.table + .row(1) + .deleteButton.waitFor({ state: 'detached' }); expect(await createInboundPage.addItemsStep.table.rows.count()).toBe(1); }); @@ -281,7 +284,7 @@ test.describe('Values persistance between steps', () => { ).toContainText(USER.name); await expect( createInboundPage.createStep.dateRequestedDatePicker.textbox - ).toHaveValue(formatDate(TODAY)); + ).toHaveValue(formatDate(TODAY, 'DD/MMM/YYYY')); }); await test.step('Go next step (Add items)', async () => { @@ -353,9 +356,9 @@ test.describe('Values persistance between steps', () => { }); await test.step('Assert data on send step', async () => { - await expect(createInboundPage.sendStep.originField.textbox).toHaveValue( - ORIGIN.name - ); + await expect( + createInboundPage.sendStep.originField.selectField + ).toContainText(ORIGIN.name); await expect( createInboundPage.sendStep.destinationSelect.selectField ).toContainText(CURRENT_LOCATION.name); @@ -373,7 +376,7 @@ test.describe('Values persistance between steps', () => { ); await expect( createInboundPage.sendStep.expectedDeliveryDatePicker.textbox - ).toHaveValue(formatDate(EXPECTED_DELIVERY_DATE)); + ).toHaveValue(formatDate(EXPECTED_DELIVERY_DATE, 'DD/MMM/YYYY')); for (let i = 0; i < ROWS.length; i++) { const data = ROWS[i]; diff --git a/src/tests/inbound/createInbound/downloadDocsFromSendPage.test.ts b/src/tests/inbound/createInbound/downloadDocsFromSendPage.test.ts index 08d892d..af8ff0f 100644 --- a/src/tests/inbound/createInbound/downloadDocsFromSendPage.test.ts +++ b/src/tests/inbound/createInbound/downloadDocsFromSendPage.test.ts @@ -57,6 +57,9 @@ test.describe('Download documents from inbound send page', () => { }); await test.step('Fill create stock movement page', async () => { + await createInboundPage.createStep.descriptionField.textbox.fill( + DESCRIPTION + ); await createInboundPage.createStep.originSelect.findAndSelectOption( ORIGIN.name ); @@ -64,9 +67,6 @@ test.describe('Download documents from inbound send page', () => { USER.name ); await createInboundPage.createStep.dateRequestedDatePicker.fill(TODAY); - await createInboundPage.createStep.descriptionField.textbox.fill( - DESCRIPTION - ); }); await test.step('Go to add items page)', async () => { @@ -97,6 +97,14 @@ test.describe('Download documents from inbound send page', () => { }); await test.step('Expand download dropdown and assert documents in pending shipment', async () => { + await expect(createInboundPage.sendStep.downloadButton).toBeDisabled(); + await createInboundPage.sendStep.shipmentTypeSelect.findAndSelectOption( + SHIPMENT_TYPE + ); + await createInboundPage.sendStep.expectedDeliveryDatePicker.fill( + EXPECTED_DELIVERY_DATE + ); + await expect(createInboundPage.sendStep.downloadButton).toBeEnabled(); await createInboundPage.sendStep.downloadButton.click(); await expect( createInboundPage.sendStep.getDocuments('Export Packing List (.xls)') @@ -122,6 +130,7 @@ test.describe('Download documents from inbound send page', () => { }); await test.step('Download Export Packing List (.xls) file', async () => { + await createInboundPage.sendStep.downloadButton.click(); const popupPromise = page.waitForEvent('popup'); await createInboundPage.sendStep .getDocuments('Export Packing List (.xls)') @@ -131,19 +140,14 @@ test.describe('Download documents from inbound send page', () => { }); await test.step('Download Packing List file', async () => { + await createInboundPage.sendStep.downloadButton.click(); const popupPromise = page.waitForEvent('popup'); await createInboundPage.sendStep.getDocuments('Packing List').click(); const popup = await popupPromise; await popup.close(); }); - await test.step('Fill send page and send shipment', async () => { - await createInboundPage.sendStep.shipmentTypeSelect.findAndSelectOption( - SHIPMENT_TYPE - ); - await createInboundPage.sendStep.expectedDeliveryDatePicker.fill( - EXPECTED_DELIVERY_DATE - ); + await test.step('Send shipment', async () => { await createInboundPage.sendStep.sendShipmentButton.click(); await stockMovementShowPage.isLoaded(); }); @@ -179,45 +183,50 @@ test.describe('Download documents from inbound send page', () => { ' - Packing List.xls'; await test.step('Download Certificate of Donation file', async () => { - const popupPromise = page.waitForEvent('popup'); - await createInboundPage.sendStep - .getDocuments('Certificate of Donation') - .click(); - const popup = await popupPromise; - const downloadPromise = popup.waitForEvent('download'); - const download = await downloadPromise; + await createInboundPage.sendStep.isLoaded(); + + const [popup, download] = await Promise.all([ + page.waitForEvent('popup'), + page.waitForEvent('download'), + createInboundPage.sendStep + .getDocuments('Certificate of Donation') + .click(), + ]); + + expect(download.suggestedFilename()).toBe(certificateOfDonationFileName); await popup.close(); - await expect(download.suggestedFilename()).toBe( - certificateOfDonationFileName - ); }); await test.step('Download Export Packing List (.xls) file', async () => { await createInboundPage.sendStep.isLoaded(); - const popupPromise = page.waitForEvent('popup'); - await createInboundPage.sendStep - .getDocuments('Export Packing List (.xls)') - .click(); - const popup = await popupPromise; - const downloadPromise = popup.waitForEvent('download'); - const download = await downloadPromise; + await createInboundPage.sendStep.downloadButton.click(); + + const [popup, download] = await Promise.all([ + page.waitForEvent('popup'), + page.waitForEvent('download'), + createInboundPage.sendStep + .getDocuments('Export Packing List (.xls)') + .click(), + ]); + + expect(download.suggestedFilename()).toBe(exportPackingListFileName); await popup.close(); - await expect(download.suggestedFilename()).toBe( - exportPackingListFileName - ); }); await test.step('Download Packing list file', async () => { await createInboundPage.sendStep.isLoaded(); - const popupPromise = page.waitForEvent('popup'); - await createInboundPage.sendStep.getDocuments('Packing List').click(); - const popup = await popupPromise; - const downloadPromise = popup.waitForEvent('download'); - const download = await downloadPromise; - await popup.close(); - await expect(download.suggestedFilename()).toMatch( + await createInboundPage.sendStep.downloadButton.click(); + + const [popup, download] = await Promise.all([ + page.waitForEvent('popup'), + page.waitForEvent('download'), + createInboundPage.sendStep.getDocuments('Packing List').click(), + ]); + + expect(download.suggestedFilename()).toMatch( /^Packing List - .*\.xls(x)?$/ ); + await popup.close(); }); }); }); diff --git a/src/tests/inbound/createInbound/fieldValidation.test.ts b/src/tests/inbound/createInbound/fieldValidation.test.ts index 55b194f..fdd4afd 100644 --- a/src/tests/inbound/createInbound/fieldValidation.test.ts +++ b/src/tests/inbound/createInbound/fieldValidation.test.ts @@ -82,16 +82,16 @@ test('Create Inbound stock movement field validations', async ({ await test.step('Assert field validation on Description field (Create step)', async () => { await createInboundPage.createStep.descriptionField.assertHasError(); - await expect( - createInboundPage.createStep.descriptionField.errorMessage - ).toContainText('This field is required'); + await createInboundPage.createStep.descriptionField.assertFieldWithErrorIsVisible( + 'is required' + ); }); await test.step('Assert field validation on Origin field (Create step)', async () => { await createInboundPage.createStep.originSelect.assertHasError(); - await expect( - createInboundPage.createStep.originSelect.errorMessage - ).toContainText('This field is required'); + await createInboundPage.createStep.originSelect.assertFieldWithErrorIsVisible( + 'is required' + ); }); await test.step('Assert no field validation on Destination field (Create step)', async () => { @@ -100,9 +100,9 @@ test('Create Inbound stock movement field validations', async ({ await test.step('Assert field validation on Requested By field (Create step)', async () => { await createInboundPage.createStep.requestedBySelect.assertHasError(); - await expect( - createInboundPage.createStep.requestedBySelect.errorMessage - ).toContainText('This field is required'); + await createInboundPage.createStep.requestedBySelect.assertFieldWithErrorIsVisible( + 'is required' + ); }); await test.step('Assert no field validation on Stock field (Create step)', async () => { @@ -111,9 +111,9 @@ test('Create Inbound stock movement field validations', async ({ await test.step('Assert field validation on Date Requested field (Create step)', async () => { await createInboundPage.createStep.dateRequestedDatePicker.assertHasError(); - await expect( - createInboundPage.createStep.dateRequestedDatePicker.errorMessage - ).toContainText('This field is required'); + await createInboundPage.createStep.dateRequestedDatePicker.assertFieldWithErrorIsVisible( + 'is required' + ); }); await test.step('Fill all required field on create step (Create step)', async () => { @@ -130,6 +130,7 @@ test('Create Inbound stock movement field validations', async ({ }); await test.step('Go to next step (Create -> Add Items)', async () => { + await createInboundPage.nextButton.focus(); await createInboundPage.nextButton.click(); }); @@ -164,6 +165,7 @@ test('Create Inbound stock movement field validations', async ({ await test.step('Fill pack level 1 (Add Items)', async () => { await row.packLevel1Field.textbox.fill(ROW.packLevel1); + await row.packLevel1Field.textbox.blur(); await row.packLevel2Field.assertHasNoError(); }); @@ -191,6 +193,9 @@ test('Create Inbound stock movement field validations', async ({ }); await test.step('Expected delivery date should be empty', async () => { + await createInboundPage.sendStep.isLoaded(); + await createInboundPage.sendStep.commentField.textbox.focus(); + await createInboundPage.sendStep.expectedDeliveryDatePicker.textbox.focus(); await expect( createInboundPage.sendStep.expectedDeliveryDatePicker.textbox ).toHaveValue(''); @@ -200,11 +205,21 @@ test('Create Inbound stock movement field validations', async ({ await createInboundPage.sendStep.sendShipmentButton.click(); }); - await test.step('Expected delivery date field shoudl have validation error', async () => { - await createInboundPage.sendStep.expectedDeliveryDatePicker.assertHasError(); - await expect( - createInboundPage.sendStep.expectedDeliveryDatePicker.errorMessage - ).toContainText('This field is required'); + await test.step('Assert shipment type is required', async () => { + await createInboundPage.sendStep.shipmentTypeSelect.assertHasError(); + await createInboundPage.sendStep.shipmentTypeSelect.assertFieldWithErrorIsVisible( + 'This field is required' + ); + await createInboundPage.sendStep.shipmentTypeSelect.findAndSelectOption( + 'Air' + ); + await createInboundPage.sendStep.sendShipmentButton.click(); + }); + + await test.step('Expected delivery date field should have validation error', async () => { + await createInboundPage.sendStep.expectedDeliveryDatePicker.assertFieldWithErrorIsVisible( + 'This field is required' + ); }); await test.step('Fill expected delivery date one day before ship date', async () => { @@ -214,17 +229,11 @@ test('Create Inbound stock movement field validations', async ({ }); await test.step('Assert field validation errors on Ship date and Expeted delivery date fields', async () => { - await createInboundPage.sendStep.shipDateDatePicker.assertHasError(); - await expect( - createInboundPage.sendStep.shipDateDatePicker.errorMessage - ).toContainText( + await createInboundPage.sendStep.shipDateDatePicker.assertFieldWithErrorIsVisible( 'Please verify timeline. Delivery date cannot be before Ship date.' ); - await createInboundPage.sendStep.expectedDeliveryDatePicker.assertHasError(); - await expect( - createInboundPage.sendStep.expectedDeliveryDatePicker.errorMessage - ).toContainText( + await createInboundPage.sendStep.expectedDeliveryDatePicker.assertFieldWithErrorIsVisible( 'Please verify timeline. Delivery date cannot be before Ship date.' ); }); diff --git a/src/tests/inbound/createInbound/inboundStatusChanges.test.ts b/src/tests/inbound/createInbound/inboundStatusChanges.test.ts index 374f6d0..3869adb 100644 --- a/src/tests/inbound/createInbound/inboundStatusChanges.test.ts +++ b/src/tests/inbound/createInbound/inboundStatusChanges.test.ts @@ -1,11 +1,7 @@ import { expect, test } from '@/fixtures/fixtures'; import InboundListPage from '@/pages/inbound/list/InboundListPage'; import StockMovementShowPage from '@/pages/stockMovementShow/StockMovementShowPage'; -import { - AddItemsTableRow, - LocationResponse, - User, -} from '@/types'; +import { AddItemsTableRow, LocationResponse, User } from '@/types'; import { formatDate, getDateByOffset, getToday } from '@/utils/DateUtils'; import UniqueIdentifier from '@/utils/UniqueIdentifier'; @@ -112,6 +108,7 @@ test.describe('Status changes for inbound sm on view sm and inbound list page', const row = createInboundPage.addItemsStep.table.row(1); await row.productSelect.findAndSelectOption(data.productName); await row.quantityField.numberbox.fill(data.quantity); + await row.quantityField.numberbox.blur(); expect(await createInboundPage.addItemsStep.table.rows.count()).toBe(2); }); @@ -298,6 +295,7 @@ test.describe('Status changes for inbound sm on view sm and inbound list page', const row = createInboundPage.addItemsStep.table.row(1); await row.productSelect.findAndSelectOption(data.productName); await row.quantityField.numberbox.fill(data.quantity); + await row.quantityField.numberbox.blur(); expect(await createInboundPage.addItemsStep.table.rows.count()).toBe(2); }); diff --git a/src/tests/inbound/createInbound/itemTemplate.test.ts b/src/tests/inbound/createInbound/itemTemplate.test.ts index b6ad0cc..db5a106 100644 --- a/src/tests/inbound/createInbound/itemTemplate.test.ts +++ b/src/tests/inbound/createInbound/itemTemplate.test.ts @@ -37,9 +37,11 @@ test.describe('Export items template on inbound add items page', () => { let filePath: string; let downloadedTemplateFile: WorkbookUtils; - await test.step('Go to inbound list page', async () => { + await test.step('Go to inbound add items page', async () => { await createInboundPage.goToPage(STOCK_MOVEMENT.id); + await createInboundPage.nextButton.click(); await createInboundPage.addItemsStep.isLoaded(); + await createInboundPage.addItemsStep.waitForNetworkIdle(); }); await test.step('Download template', async () => { @@ -81,6 +83,7 @@ test.describe('Export items template on inbound add items page', () => { }) => { await test.step('Go to inbound list page', async () => { await createInboundPage.goToPage(STOCK_MOVEMENT.id); + await createInboundPage.nextButton.click(); await createInboundPage.addItemsStep.isLoaded(); }); @@ -181,7 +184,9 @@ test.describe('Import template with data', () => { }) => { await test.step('Go to inbound list page', async () => { await createInboundPage.goToPage(STOCK_MOVEMENT.id); + await createInboundPage.nextButton.click(); await createInboundPage.addItemsStep.isLoaded(); + await createInboundPage.addItemsStep.waitForNetworkIdle(); }); let downloadedTemplateFile: WorkbookUtils; @@ -261,7 +266,9 @@ test.describe('Import template with data', () => { }) => { await test.step('Go to inbound list page', async () => { await createInboundPage.goToPage(STOCK_MOVEMENT.id); + await createInboundPage.nextButton.click(); await createInboundPage.addItemsStep.isLoaded(); + await createInboundPage.addItemsStep.waitForNetworkIdle(); }); await test.step('Add items to table', async () => { @@ -352,6 +359,7 @@ test.describe('Import template with data', () => { }) => { await test.step('Go to inbound list page', async () => { await createInboundPage.goToPage(STOCK_MOVEMENT.id); + await createInboundPage.nextButton.click(); await createInboundPage.addItemsStep.isLoaded(); }); diff --git a/src/tests/inbound/createInbound/tableShortcuts.test.ts b/src/tests/inbound/createInbound/tableShortcuts.test.ts index 30b85bd..99e2404 100644 --- a/src/tests/inbound/createInbound/tableShortcuts.test.ts +++ b/src/tests/inbound/createInbound/tableShortcuts.test.ts @@ -72,13 +72,15 @@ test('Use Control+ArrowDown copy cell shortcut', async ({ await createInboundPage.addItemsStep.addLineButton.click({ delay: 300, }); + await createInboundPage.addItemsStep.addLineButton.click({ + delay: 300, + }); }); await test.step('Use Control+ArrowDown copy cell shortcut on Pack Level 1', async () => { await createInboundPage.addItemsStep.table .row(0) .packLevel1Field.textbox.fill(ROW.packLevel1); - await createInboundPage.addItemsStep.table.row(0).packLevel1Field.textbox.focus(); await page.keyboard.press('Control+ArrowDown'); await page.keyboard.press('Control+ArrowDown'); @@ -94,10 +96,12 @@ test('Use Control+ArrowDown copy cell shortcut', async ({ }); await test.step('Use Control+ArrowDown copy cell shortcut on Pack Level 2', async () => { + await createInboundPage.addItemsStep.table + .row(0) + .packLevel2Field.textbox.focus(); await createInboundPage.addItemsStep.table .row(0) .packLevel2Field.textbox.fill(ROW.packLevel2); - await createInboundPage.addItemsStep.table.row(0).packLevel2Field.textbox.focus(); await page.keyboard.press('Control+ArrowDown'); await page.keyboard.press('Control+ArrowDown'); @@ -113,10 +117,10 @@ test('Use Control+ArrowDown copy cell shortcut', async ({ }); await test.step('Use Control+ArrowDown copy cell shortcut on Lot Number', async () => { + await createInboundPage.addItemsStep.table.row(0).lotField.textbox.focus(); await createInboundPage.addItemsStep.table .row(0) .lotField.textbox.fill(ROW.lotNumber); - await createInboundPage.addItemsStep.table.row(0).lotField.textbox.focus(); await page.keyboard.press('Control+ArrowDown'); await page.keyboard.press('Control+ArrowDown'); @@ -132,10 +136,12 @@ test('Use Control+ArrowDown copy cell shortcut', async ({ }); await test.step('Use Control+ArrowDown copy cell shortcut on Quantity', async () => { + await createInboundPage.addItemsStep.table + .row(0) + .quantityField.numberbox.focus(); await createInboundPage.addItemsStep.table .row(0) .quantityField.numberbox.fill(ROW.quantity); - await createInboundPage.addItemsStep.table.row(0).quantityField.numberbox.focus(); await page.keyboard.press('Control+ArrowDown'); await page.keyboard.press('Control+ArrowDown'); diff --git a/src/tests/inbound/listPage/exportStockMovements.test.ts b/src/tests/inbound/listPage/exportStockMovements.test.ts index 05b266e..5ac1374 100644 --- a/src/tests/inbound/listPage/exportStockMovements.test.ts +++ b/src/tests/inbound/listPage/exportStockMovements.test.ts @@ -102,6 +102,7 @@ test.describe('Export stock movements', () => { ]; await test.step('Download file', async () => { + await inboundListPage.waitForNetworkIdle(); const { fullFilePath } = await inboundListPage.exportStockMovements(); filePath = fullFilePath; }); @@ -157,6 +158,7 @@ test.describe('Export stock movements', () => { }); await test.step('Download filtered file', async () => { + await inboundListPage.waitForNetworkIdle(); const { fullFilePath } = await inboundListPage.exportStockMovements(); filePath = fullFilePath; }); diff --git a/src/tests/inbound/listPage/receiptStatusFilter.test.ts b/src/tests/inbound/listPage/receiptStatusFilter.test.ts index a8238f0..dab2cb0 100644 --- a/src/tests/inbound/listPage/receiptStatusFilter.test.ts +++ b/src/tests/inbound/listPage/receiptStatusFilter.test.ts @@ -146,7 +146,7 @@ test.describe('Filter by "Received" status', () => { await receivingPage.receivingStep.isLoaded(); }); - await test.step('Select all items to receiv', async () => { + await test.step('Select all items to receive', async () => { await receivingPage.receivingStep.table .row(1) .receivingNowField.textbox.fill('2'); @@ -159,6 +159,7 @@ test.describe('Filter by "Received" status', () => { await test.step('Receive shipment', async () => { await receivingPage.checkStep.isLoaded(); await receivingPage.checkStep.receiveShipmentButton.click(); + await stockMovementShowPage.isLoaded(); }); } ); @@ -255,6 +256,7 @@ test.describe('Filter by "Receiving" status', () => { await test.step('Receive shipment', async () => { await receivingPage.checkStep.isLoaded(); await receivingPage.checkStep.receiveShipmentButton.click(); + await stockMovementShowPage.isLoaded(); }); } );