Skip to content

Commit

Permalink
update para to eth e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marshacb committed Dec 17, 2024
1 parent f3824c4 commit 23b4a5a
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions e2e-tests/hydration.ethereum.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,11 @@ describe('Hydration <> Ethereum', () => {
await polkadotAssetHub.dev.newBlock();

const assetHubEvents = await polkadotAssetHub.api.query.system.events();
const foreignAssetsBurnedEvent = assetHubEvents[4];
expect(foreignAssetsBurnedEvent.phase.toString()).toEqual('Finalization');
expect(foreignAssetsBurnedEvent.event.section).toEqual('foreignAssets');
expect(foreignAssetsBurnedEvent.event.method).toEqual('Burned');

const xcmMessageSentEvent = assetHubEvents[6];
expect(xcmMessageSentEvent.phase.toString()).toEqual('Finalization');
expect(xcmMessageSentEvent.event.method).toEqual('XcmpMessageSent');
expect(xcmMessageSentEvent.event.section).toEqual('xcmpQueue');
const xcmMessageProcessed = assetHubEvents[assetHubEvents.length - 1];
expect(xcmMessageProcessed.phase.toString()).toEqual('Finalization');
expect(xcmMessageProcessed.event.method).toEqual('Processed');
expect(xcmMessageProcessed.event.section).toEqual('messageQueue');

await setTimeout(5000);
await polkadotBridgeHub.dev.timeTravel(1);
Expand Down Expand Up @@ -196,15 +192,11 @@ describe('Hydration <> Ethereum', () => {
await polkadotAssetHub.dev.newBlock();

const assetHubEvents = await polkadotAssetHub.api.query.system.events();
const foreignAssetsBurnedEvent = assetHubEvents[4];
expect(foreignAssetsBurnedEvent.phase.toString()).toEqual('Finalization');
expect(foreignAssetsBurnedEvent.event.section).toEqual('foreignAssets');
expect(foreignAssetsBurnedEvent.event.method).toEqual('Burned');

const xcmMessageSentEvent = assetHubEvents[6];
expect(xcmMessageSentEvent.phase.toString()).toEqual('Finalization');
expect(xcmMessageSentEvent.event.method).toEqual('XcmpMessageSent');
expect(xcmMessageSentEvent.event.section).toEqual('xcmpQueue');

const xcmMessageProcessed = assetHubEvents[assetHubEvents.length - 1];
expect(xcmMessageProcessed.phase.toString()).toEqual('Finalization');
expect(xcmMessageProcessed.event.method).toEqual('Processed');
expect(xcmMessageProcessed.event.section).toEqual('messageQueue');

await setTimeout(5000);
await polkadotBridgeHub.dev.timeTravel(1);
Expand Down

0 comments on commit 23b4a5a

Please sign in to comment.