/**
|
* @file ADSO-10086
|
* @description Verify there are only two accounts for unit cost
|
* @author Gay Er Xuan (erxuan.gay@3ds.com)
|
* @copyright Dassault Systemes
|
*/
|
import { qCustomMatcher } from '../../../e2elib/lib/src/main/qmatchers.const';
|
import { AppMP, Demo, Scenario } from '../../../libmp/appmp';
|
import { DataFoodBaseAccountName } from '../../../libmp/data/data.account';
|
|
describe('ADSO-10086 - Food demo shows 2 accounts related to unit cost', () => {
|
const appMP = AppMP.getInstance();
|
|
beforeAll(async () => {
|
jasmine.addMatchers(qCustomMatcher);
|
await appMP.login();
|
});
|
|
afterAll(async () => {
|
await appMP.cleanupAndLogout();
|
});
|
|
afterEach(async () => {
|
await appMP.checkToastMessage();
|
});
|
|
it(`Setup - ${AppMP.getDemoDataPath(Demo.Food, Scenario.Base)}`, async () => {
|
await appMP.createDemoDataset(Demo.Food, Scenario.Base, false);
|
});
|
|
it(`Step 1 - Open view ${appMP.viewUnitCost.viewPath}. Verify only General fixed costs, Changeover cost and Shift pattern costs exist in Unit Account list`, async () => {
|
await appMP.viewUnitCost.switchTo();
|
|
const listUnitAccount = appMP.viewUnitCost.frmUnitAccount.listAccount;
|
// Verify the list only contain 3 unit accounts
|
expect(await listUnitAccount.getRowCount()).toBe(3, 'Number of unit accounts should be exactly 3');
|
|
// Verify costs exist in the list
|
await listUnitAccount.verifyRowExists({ Account: DataFoodBaseAccountName.GeneralFixedCosts });
|
await listUnitAccount.verifyRowExists({ Account: DataFoodBaseAccountName.ChangeoverCost });
|
await listUnitAccount.verifyRowExists({ Account: DataFoodBaseAccountName.ShiftPatternCosts });
|
});
|
});
|