-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More e2e Cleanups and Improvements #1756
Conversation
api -> apiPromise
Handles Remove unused helper
Remove unneeded fund and send Funds for staking Staking uses signAndSend
|
||
const failStakeObj = ExtrinsicHelper.stake(stakeKeys, maxMsaId + 1, stakeAmount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this test is running in parallel, it cannot just use maxMsaId + 1 as other msas are being created and might be providers.
@@ -38,212 +36,4 @@ describe("Create Accounts", function () { | |||
}); | |||
}); | |||
}); | |||
|
|||
describe("addPublicKeyToMsa", function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to msaKeyManagemement.test.ts
for less dependent tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from msa/createMsa.test.ts
@@ -221,10 +221,6 @@ export class ExtrinsicHelper { | |||
return ExtrinsicHelper.apiPromise.query.schemas.governanceSchemaModelMaxBytes(); | |||
} | |||
|
|||
public static getCurrentMsaIdentifierMaximum() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now unused.
@@ -407,20 +424,19 @@ export async function getOrCreateAvroChatMessageItemizedSchema(source: KeyringPa | |||
|
|||
export const TokenPerCapacity = 50n; | |||
|
|||
export function assertEvent(events: EventMap, eventName: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved down with the other assert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was missing .test.ts
so it wasn't running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
const totalCapacity = (await getRemainingCapacity(stakeProviderId)).toBigInt(); | ||
async function drainCapacity(call, stakeProviderId: u64): Promise<bigint> { | ||
const totalCapacity = (await getCapacity(stakeProviderId)).totalCapacityIssued.toBigInt(); | ||
let nonce = await getNonce(call.keys); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I didn't know you could do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Goal
The goal of this PR is another pile of small e2e fixes and cleanups
Part of #1731
Discussion
signAndSend
Testing
make e2e-tests