Skip to content

QA Challenge – RaylsToken Integration Tests#4

Open
Johws wants to merge 7 commits intoraylsnetwork:mainfrom
Johws:feat/rayls-token-e2e
Open

QA Challenge – RaylsToken Integration Tests#4
Johws wants to merge 7 commits intoraylsnetwork:mainfrom
Johws:feat/rayls-token-e2e

Conversation

@Johws
Copy link

@Johws Johws commented Feb 11, 2026

Pull Request: RaylsToken E2E Tests

Overview

This PR implements a full End-to-End (E2E) test suite for the RaylsToken smart contract. The tests cover deployment, token minting, transfers, approvals, and burning, using three distinct accounts as required by the challenge:

Owner / Deployer (provided private key)

**User A (generated)

User B (generated)**

The test suite uses the Page Object Pattern (RaylsTokenPO) to abstract contract interactions, improving maintainability and readability.

How to Run the Tests

Locally (Hardhat network)

npx hardhat test

Uses the default Hardhat local network

The Owner account is configured with the provided private key

User A and User B are generated as local Ethereum addresses by Hardhat

All tests pass locally

image

On Rayls Devnet

npx hardhat test --network rayls_devnet

RPC, chain ID, and private keys for all three accounts must be configured

⚠️ Note: Devnet tests failed with a 522 error:

HardhatError: HH110: Invalid JSON-RPC response received: error code: 522

image

Local tests are passing and correctly simulate transfers, minting, approvals, and burning.

Design Patterns Used

Page Object Model (PO):
The RaylsTokenPO class abstracts direct interactions with the contract (mint, burn, approve, transferFrom), making tests cleaner.

Fixtures / Helpers:
Before each suite, wallets are instantiated and initial ETH transfers are performed to prepare accounts for testing.

Notes

Tests are written in TypeScript using Hardhat + Ethers v6 + Chai

The Owner account must have enough tokens on Devnet to fund User A and User B

Test Coverage

The following features are covered:

Deployment and initial supply assignment

Minting (owner only)

Token transfers and approvals

Burning tokens

Gas estimation for minting

Event emission validation (Transfer, Approval)

Summary

Tests pass locally

Devnet connection currently fails due to RPC 522 error

Code follows the challenge requirements and uses proper abstractions (PO model)

@Johws Johws changed the title Initial settings - E2E - Rayls RaylsToken E2E Tests Feb 12, 2026
@Johws Johws marked this pull request as ready for review February 12, 2026 23:13
@Johws Johws closed this Feb 12, 2026
@Johws Johws reopened this Feb 12, 2026
@Johws Johws changed the title RaylsToken E2E Tests QA Challenge – RaylsToken Integration Tests Feb 12, 2026
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.

1 participant