Skip to content
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

Updated setActiveWallet.ts for fetching test wallet address #48

Merged
merged 3 commits into from
Oct 5, 2024

Conversation

varunpareek690
Copy link
Collaborator

Related Issue: #29
This pull request introduces new step definitions to enhance our testing framework by allowing the retrieval of wallet addresses based on their index from a local blockchain . This functionality is essential for improving our interaction with test wallets, making it easier to manage and validate wallet addresses during testing.

Changes Made:

  1. Added the fetchWalletByIndexStep function to setActiveWallet.js, which allows users to fetch and log the wallet address corresponding to a specified index without setting it as the active wallet.
  2. This new step is registered in register.ts to enable its usage in Cucumber tests.

Example usage

When("I fetch the wallet address at index {int}", fetchWalletByIndexStep);

Copy link

changeset-bot bot commented Oct 3, 2024

🦋 Changeset detected

Latest commit: e259360

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chukti Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chukti ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 8:42am

Copy link
Owner

@ITZSHOAIB ITZSHOAIB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update the documentation as well by adding this new step definition in the https:/ITZSHOAIB/chukti/blob/master/docs/step-definitions/blockchain.md


export const fetchWalletByIndexStep = async (index: number) => {
const testWallet = await getTestWalletAddress({ index });

Copy link
Owner

@ITZSHOAIB ITZSHOAIB Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!world.chukti) {
world.chukti = {};
}
world.chukti.lastResult = testWallet

We need to store it in the lastResult property so that user will be able to store this data using I store the result in {string} step definition

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sir, I will be doing that and creating a new updated pull request! Thank you for inputs

@varunpareek690
Copy link
Collaborator Author

Please check sir , are the requirements filled now.. Please let me know if I missed something!

Copy link
Owner

@ITZSHOAIB ITZSHOAIB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ITZSHOAIB ITZSHOAIB merged commit 1bc6c67 into ITZSHOAIB:master Oct 5, 2024
4 checks passed
@github-actions github-actions bot mentioned this pull request Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants