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

Enhance and Refactor Vesting Tests with Utility Functions and Configuration Updates #865

Merged
merged 28 commits into from
Nov 12, 2024

Conversation

asiniscalchi
Copy link
Member

@asiniscalchi asiniscalchi commented Nov 6, 2024

PR Type

Tests, Enhancement


Description

  • Enhanced vesting tests with detailed steps, checks, and refactoring for clarity.
  • Added chai-as-promised for better promise-based assertions in tests.
  • Introduced utility functions for transaction handling and block waiting.
  • Updated provider setup to use WsProvider for WebSocket connections.
  • Changed configuration variable from LOCAL_NODE_URL to LOCAL_NODE_IP.
  • Removed vesting configuration from the test genesis config.
  • Updated web3 dependency version to ^1.10.0 in both package.json and package-lock.json.

Changes walkthrough 📝

Relevant files
Configuration changes
laos.rs
Remove vesting configuration from test genesis config       

node/src/chain_spec/laos.rs

  • Removed vesting configuration from the test genesis config.
+0/-3     
config.ts
Update local node configuration variable name                       

e2e-tests/tests/config.ts

  • Changed LOCAL_NODE_URL to LOCAL_NODE_IP.
+1/-1     
Tests
test-vesting.ts
Enhance and refactor vesting tests with detailed steps     

e2e-tests/tests/test-vesting.ts

  • Added chai-as-promised for promise-based assertions.
  • Enhanced vesting tests with more detailed steps and checks.
  • Refactored test structure for clarity and completeness.
  • +71/-44 
    Enhancement
    util.ts
    Add utility functions and update provider setup                   

    e2e-tests/tests/util.ts

  • Added utility functions for transaction handling and block waiting.
  • Updated provider initialization to use WsProvider.
  • Added account keys to wallet in test setup.
  • +92/-5   
    Dependencies
    package-lock.json
    Update web3 dependency version in package-lock                     

    e2e-tests/package-lock.json

    • Updated web3 dependency version to ^1.10.0.
    +1/-1     
    package.json
    Update web3 dependency version in package.json                     

    e2e-tests/package.json

    • Updated web3 dependency version to ^1.10.0.
    +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @asiniscalchi
    Copy link
    Member Author

    /describe

    @github-actions github-actions bot changed the title Feature/fix vesting tests Enhance and Refactor Vesting Tests with Utility Functions and Configuration Updates Nov 6, 2024
    Copy link

    github-actions bot commented Nov 6, 2024

    PR Description updated to latest commit (19dac8d)

    @asiniscalchi
    Copy link
    Member Author

    /review

    Copy link

    github-actions bot commented Nov 6, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Error Handling
    Ensure proper error handling and user feedback for transaction failures and rejections in the new utility functions.

    Test Coverage
    Verify that the new test cases cover all possible scenarios and edge cases for the vesting process, including failure modes.

    @asiniscalchi asiniscalchi marked this pull request as ready for review November 6, 2024 15:32
    Copy link
    Collaborator

    @tsenovilla tsenovilla left a comment

    Choose a reason for hiding this comment

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

    Great job! I added some minor change requests

    magecnion and others added 8 commits November 12, 2024 11:19
    Co-authored-by: Tomás Senovilla Polo  <117524919+tsenovilla@users.noreply.github.com>
    Co-authored-by: Tomás Senovilla Polo  <117524919+tsenovilla@users.noreply.github.com>
    Co-authored-by: Tomás Senovilla Polo  <117524919+tsenovilla@users.noreply.github.com>
    Co-authored-by: Tomás Senovilla Polo  <117524919+tsenovilla@users.noreply.github.com>
    Co-authored-by: Tomás Senovilla Polo  <117524919+tsenovilla@users.noreply.github.com>
    Co-authored-by: Tomás Senovilla Polo  <117524919+tsenovilla@users.noreply.github.com>
    Copy link
    Collaborator

    @tsenovilla tsenovilla left a comment

    Choose a reason for hiding this comment

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

    lgtm!

    @magecnion magecnion merged commit 221c666 into main Nov 12, 2024
    10 checks passed
    @magecnion magecnion deleted the feature/fix_vesting_tests branch November 12, 2024 11:35
    @magecnion magecnion linked an issue Nov 12, 2024 that may be closed by this pull request
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    Enable Async Backing
    4 participants