Browse Source

made tests code complient with the latest runtime changes

Gleb Urvanov 4 years ago
parent
commit
f792bafe96

+ 1 - 1
tests/network-tests/src/nicaea/tests/impl/electingCouncil.ts

@@ -2,7 +2,7 @@ import { KeyringPair } from '@polkadot/keyring/types';
 import { ApiWrapper } from '../../utils/apiWrapper';
 import { Keyring } from '@polkadot/api';
 import BN from 'bn.js';
-import { Seat } from '@nicaea/types/lib/council';
+import { Seat } from '@nicaea/types/council';
 import { assert } from 'chai';
 import { v4 as uuid } from 'uuid';
 import { Utils } from '../../utils/utils';

+ 4 - 4
tests/network-tests/src/nicaea/tests/workingGroup/impl/workingGroupModule.ts

@@ -80,11 +80,11 @@ export async function addLeaderOpening(
   opening.setMaxActiveApplicants(new BN(membersKeyPairs.length));
   opening.setMaxReviewPeriodLength(new BN(32));
   opening.setApplicationStakingPolicyAmount(new BN(applicationStake));
-  opening.setApplicationCrowdedOutUnstakingPeriodLength(new BN(0));
-  opening.setApplicationExpiredUnstakingPeriodLength(new BN(0));
+  opening.setApplicationCrowdedOutUnstakingPeriodLength(new BN(1));
+  opening.setApplicationExpiredUnstakingPeriodLength(new BN(1));
   opening.setRoleStakingPolicyAmount(new BN(roleStake));
-  opening.setRoleCrowdedOutUnstakingPeriodLength(new BN(0));
-  opening.setRoleExpiredUnstakingPeriodLength(new BN(0));
+  opening.setRoleCrowdedOutUnstakingPeriodLength(new BN(1));
+  opening.setRoleExpiredUnstakingPeriodLength(new BN(1));
   opening.setSlashableMaxCount(new BN(1));
   opening.setSlashableMaxPercentPtsPerTime(new BN(100));
   opening.setSuccessfulApplicantApplicationStakeUnstakingPeriod(new BN(1));

+ 1 - 1
tests/network-tests/src/nicaea/utils/apiWrapper.ts

@@ -8,7 +8,7 @@ import { Lead, LeadId } from '@nicaea/types/content-working-group';
 import { Application, WorkerId, Worker, ApplicationIdToWorkerIdMap, Opening } from '@nicaea/types/working-group';
 import { Application as HiringApplication } from '@nicaea/types/hiring';
 import { RoleParameters } from '@nicaea/types/roles';
-import { Seat } from '@nicaea/types/lib/council';
+import { Seat } from '@nicaea/types/council';
 import { Balance, EventRecord, AccountId, BlockNumber, BalanceOf } from '@polkadot/types/interfaces';
 import BN from 'bn.js';
 import { SubmittableExtrinsic } from '@polkadot/api/types';

+ 1 - 1
tests/network-tests/src/nicaea/utils/utils.ts

@@ -4,7 +4,7 @@ import { blake2AsHex } from '@polkadot/util-crypto';
 import BN from 'bn.js';
 import fs from 'fs';
 import { decodeAddress } from '@polkadot/keyring';
-import { Seat } from '@nicaea/types/lib/council';
+import { Seat } from '@nicaea/types/council';
 
 export class Utils {
   private static LENGTH_ADDRESS = 32 + 1; // publicKey + prefix