Skip to content

Commit

Permalink
Test: reset value for e2e test of stock
Browse files Browse the repository at this point in the history
  • Loading branch information
lomamech authored and jniles committed Mar 3, 2021
1 parent c7528c4 commit 574335a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/end-to-end/stock/stock.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const StockInventoryAdjustement = require('./stock.z1.inventory-adjustment');
const StockSetting = require('./stock.setting');
const StockAggregateConsumptionTests = require('./stock.aggregate_consumption');

describe.only('Stock end-to-end test', () => {
describe('Stock end-to-end test', () => {
describe('Stock Aggregate ConsumptionTests', StockAggregateConsumptionTests);
describe('Stock Adjustment Test', StockAdjustmentTests);
describe('Stock Assign Module', StockAssignTests);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ function StockInventoriesRegistryTests() {
label : 'Quinine Bichlorhydrate, sirop, 100mg base/5ml, 100ml, flacon, Unité',
quantity : '30',
};
const vitamine = {
const acide = {
label : 'Acide Acetylsalicylique, 500mg, Tab, 1000, Vrac',
quantity : '23',
quantity : '617',
};
await modal.setDepot('Depot Principal');
await modal.submit();
await GU.expectCellValueMatch(gridId, 1, 2, quinine.label);
await GU.expectCellValueMatch(gridId, 1, 4, quinine.quantity);
await GU.expectCellValueMatch(gridId, 2, 2, vitamine.label);
await GU.expectCellValueMatch(gridId, 2, 4, vitamine.quantity);
await GU.expectCellValueMatch(gridId, 2, 2, acide.label);
await GU.expectCellValueMatch(gridId, 2, 4, acide.quantity);
await filters.resetFilters();
});
}
14 changes: 7 additions & 7 deletions test/end-to-end/stock/stock.z3.inventory-adjustment-lots.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function StockLotsRegistryTests() {
});

const gridId = 'stock-lots-grid';
const LOT_FOR_ALLTIME = 2;
const LOT_FOR_ALLTIME = 12;
const GROUPING_ROW = 1;

it(`finds ${LOT_FOR_ALLTIME} lots for all time`, async () => {
Expand All @@ -35,9 +35,9 @@ function StockLotsRegistryTests() {
});

it('find only lots set during the adjustment process', async () => {
const quinine = {
label : 'Quinine Bichlorhydrate, sirop, 100mg base/5ml, 100ml, flacon, Unité',
lot : 'QUININE-C',
const acide = {
label : 'Acide Acetylsalicylique, 500mg, Tab, 1000, Vrac',
lot : 'ASB17001',
quantity : '17',
};

Expand All @@ -58,9 +58,9 @@ function StockLotsRegistryTests() {
await GU.expectCellValueMatch(gridId, 1, 2, vitamine.label);
await GU.expectCellValueMatch(gridId, 1, 4, vitamine.lot);
await GU.expectCellValueMatch(gridId, 1, 5, vitamine.quantity);
await GU.expectCellValueMatch(gridId, 2, 2, quinine.label);
await GU.expectCellValueMatch(gridId, 2, 4, quinine.lot);
await GU.expectCellValueMatch(gridId, 2, 5, quinine.quantity);
await GU.expectCellValueMatch(gridId, 2, 2, acide.label);
await GU.expectCellValueMatch(gridId, 2, 4, acide.lot);
await GU.expectCellValueMatch(gridId, 2, 5, acide.quantity);

await filters.resetFilters();
});
Expand Down

0 comments on commit 574335a

Please sign in to comment.