@@ -2,6 +2,7 @@ import AppConfig from '@/config/AppConfig';
22import { ShipmentType } from '@/constants/ShipmentType' ;
33import { expect , test } from '@/fixtures/fixtures' ;
44import { StockMovementResponse } from '@/types' ;
5+ import BinLocationUtils from '@/utils/BinLocationUtils' ;
56import { formatDate , getDateByOffset } from '@/utils/DateUtils' ;
67
78test . describe ( 'Assert if quantity inputs remain when split lines' , ( ) => {
@@ -57,7 +58,6 @@ test.describe('Assert if quantity inputs remain when split lines', () => {
5758 const isRollbackButtonVisible =
5859 await stockMovementShowPage . rollbackButton . isVisible ( ) ;
5960
60- // due to failed test, shipment might not be received which will not show the button
6161 if ( isRollbackLastReceiptButtonVisible ) {
6262 await stockMovementShowPage . rollbackLastReceiptButton . click ( ) ;
6363 }
@@ -68,29 +68,14 @@ test.describe('Assert if quantity inputs remain when split lines', () => {
6868
6969 await stockMovementService . deleteStockMovement ( STOCK_MOVEMENT . id ) ;
7070
71- await test . step ( 'Deactivate receiving bin' , async ( ) => {
72- const mainLocation = await mainLocationService . getLocation ( ) ;
73- const receivingBin =
74- AppConfig . instance . receivingBinPrefix + STOCK_MOVEMENT . identifier ;
75- await page . goto ( './location/list' ) ;
76- await locationListPage . searchByLocationNameField . fill (
77- mainLocation . name
78- ) ;
79- await locationListPage . findButton . click ( ) ;
80- await locationListPage . getLocationEditButton ( mainLocation . name ) . click ( ) ;
81- await createLocationPage . binLocationTab . click ( ) ;
82- await createLocationPage . binLocationTabSection . isLoaded ( ) ;
83- await createLocationPage . binLocationTabSection . searchField . fill (
84- receivingBin
85- ) ;
86- await createLocationPage . binLocationTabSection . searchField . press (
87- 'Enter'
88- ) ;
89- await createLocationPage . binLocationTabSection . isLoaded ( ) ;
90- await createLocationPage . binLocationTabSection . editBinButton . click ( ) ;
91- await createLocationPage . locationConfigurationTab . click ( ) ;
92- await createLocationPage . locationConfigurationTabSection . activeCheckbox . uncheck ( ) ;
93- await createLocationPage . locationConfigurationTabSection . saveButton . click ( ) ;
71+ const receivingBin =
72+ AppConfig . instance . receivingBinPrefix + STOCK_MOVEMENT . identifier ;
73+ await BinLocationUtils . deactivateReceivingBin ( {
74+ mainLocationService,
75+ locationListPage,
76+ createLocationPage,
77+ page,
78+ receivingBin,
9479 } ) ;
9580 }
9681 ) ;
0 commit comments