iiitl / iiitl/Event_Dapp

[Hard]: Replace scaffold subgraph tests with real mapping coverage

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
difficulty:hard help wanted subgraph testing
Dominant language
JavaScript
Stars
0
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### Context and Motivation

Current subgraph tests are scaffold-style and do not validate actual mapping behavior for core handlers.

### Architecture Proposal

Build event fixtures for main contract events.
Add mapping tests for EventCreated.
Add mapping tests for TicketPurchased and user-level updates.
Add mapping tests for SpecialOfferMinted and StakeClaimed.
Assert Event, Ticket, and User entity values in store.

### Cross-Repo Scope

event-ticketinng/src/event-ticketing.ts
event-ticketinng/tests/event-ticketing.test.ts
event-ticketinng/tests/event-ticketing-utils.ts
event-ticketinng/schema.graphql

### Acceptance Criteria

- [ ] EventCreated handler has meaningful mapping tests
- [ ] TicketPurchased handler updates are fully tested
- [ ] SpecialOfferMinted and StakeClaimed handlers are tested
- [ ] graph test passes with strong entity assertions

### Verification and Test Strategy

Run graph codegen.
Run graph build.
Run graph test and verify all added tests pass.
Confirm assertions validate expected entity fields.

### Dependencies or Blockers

Requires matchstick test environment setup.
May need schema/entity alignment before assertions.

Contributor guide

Open the contributing guide

Research direction

Start with event-ticketinng/src/event-ticketing.ts and the scaffold tests in event-ticketinng/tests/event-ticketing.test.ts and event-ticketinng/tests/event-ticketing-utils.ts; review schema.graphql before defining entity assertions. Set up the Matchstick environment, then run graph codegen, graph build, and graph test. Done means the listed handlers have meaningful fixture-based tests with strong Event, Ticket, and User field assertions.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript
Domain
backend, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.