@@ -75,17 +75,17 @@ test.describe('Export items template on inbound add items page', () => {
75
75
76
76
test ( 'Downloaded template should contain all added items' , async ( {
77
77
createInboundPage,
78
- mainProductService,
79
- otherProductService,
78
+ productService,
80
79
mainUserService,
81
80
} ) => {
82
81
await test . step ( 'Go to inbound list page' , async ( ) => {
83
82
await createInboundPage . goToPage ( STOCK_MOVEMENT . id ) ;
84
83
await createInboundPage . addItemsStep . isLoaded ( ) ;
85
84
} ) ;
86
85
87
- const PRODUCT_ONE = await mainProductService . getProduct ( ) ;
88
- const PRODUCT_TWO = await otherProductService . getProduct ( ) ;
86
+ const PRODUCT_ONE = await productService . getProduct ( ) ;
87
+ productService . setProduct ( '2' ) ;
88
+ const PRODUCT_TWO = await productService . getProduct ( ) ;
89
89
const USER = await mainUserService . getUser ( ) ;
90
90
91
91
const ROWS = [
@@ -175,8 +175,7 @@ test.describe('Import template with data', () => {
175
175
176
176
test ( 'Import filled template on an empty table' , async ( {
177
177
createInboundPage,
178
- mainProductService,
179
- otherProductService,
178
+ productService,
180
179
mainUserService,
181
180
} ) => {
182
181
await test . step ( 'Go to inbound list page' , async ( ) => {
@@ -193,8 +192,9 @@ test.describe('Import template with data', () => {
193
192
workbooks . push ( downloadedTemplateFile ) ;
194
193
} ) ;
195
194
196
- const PRODUCT_ONE = await mainProductService . getProduct ( ) ;
197
- const PRODUCT_TWO = await otherProductService . getProduct ( ) ;
195
+ const PRODUCT_ONE = await productService . getProduct ( ) ;
196
+ productService . setProduct ( '2' ) ;
197
+ const PRODUCT_TWO = await productService . getProduct ( ) ;
198
198
const USER = await mainUserService . getUser ( ) ;
199
199
200
200
const ROWS = [
@@ -254,8 +254,7 @@ test.describe('Import template with data', () => {
254
254
255
255
test . skip ( 'Update existing values with template import' , async ( {
256
256
createInboundPage,
257
- otherProductService,
258
- mainProductService,
257
+ productService,
259
258
altUserService,
260
259
mainUserService,
261
260
} ) => {
@@ -265,7 +264,7 @@ test.describe('Import template with data', () => {
265
264
} ) ;
266
265
267
266
await test . step ( 'Add items to table' , async ( ) => {
268
- const PRODUCT_ONE = await mainProductService . getProduct ( ) ;
267
+ const PRODUCT_ONE = await productService . getProduct ( ) ;
269
268
const USER = await mainUserService . getUser ( ) ;
270
269
271
270
const ROWS = [
@@ -300,7 +299,8 @@ test.describe('Import template with data', () => {
300
299
parsedDocumentData = downloadedTemplateFile . sheetToJSON ( ) ;
301
300
} ) ;
302
301
303
- const PRODUCT_TWO = await otherProductService . getProduct ( ) ;
302
+ productService . setProduct ( '2' ) ;
303
+ const PRODUCT_TWO = await productService . getProduct ( ) ;
304
304
const ALT_USER = await altUserService . getUser ( ) ;
305
305
306
306
const NEW_ROW = {
@@ -345,8 +345,7 @@ test.describe('Import template with data', () => {
345
345
346
346
test ( 'Add new row to with existing items in the table' , async ( {
347
347
createInboundPage,
348
- otherProductService,
349
- mainProductService,
348
+ productService,
350
349
altUserService,
351
350
mainUserService,
352
351
} ) => {
@@ -357,7 +356,7 @@ test.describe('Import template with data', () => {
357
356
358
357
let ROW : CreateInboundAddItemsTableEntity ;
359
358
await test . step ( 'Add items to table' , async ( ) => {
360
- const PRODUCT_ONE = await mainProductService . getProduct ( ) ;
359
+ const PRODUCT_ONE = await productService . getProduct ( ) ;
361
360
const USER = await mainUserService . getUser ( ) ;
362
361
363
362
ROW = {
@@ -389,7 +388,8 @@ test.describe('Import template with data', () => {
389
388
parsedDocumentData = downloadedTemplateFile . sheetToJSON ( ) ;
390
389
} ) ;
391
390
392
- const PRODUCT_TWO = await otherProductService . getProduct ( ) ;
391
+ productService . setProduct ( '2' )
392
+ const PRODUCT_TWO = await productService . getProduct ( ) ;
393
393
const ALT_USER = await altUserService . getUser ( ) ;
394
394
395
395
const NEW_ROW = {
0 commit comments