w3b3d3v / web3-bootcamp-platform

web3-bootcamp-platform.vercel.app
MIT License
52 stars 24 forks source link

Add Unit Tests for Modal Component and NFT Submission Flow #269

Closed viniblack closed 1 week ago

viniblack commented 2 weeks ago

Pull Request Summary

Type of Change

Description

This PR adds and enhances unit tests for the Modal component and the mintNFT function. The primary goal is to validate the correct functionality of lesson submission via the modal, including calling the mintNFT function to create an NFT. The added mocks and test setup ensure that data interactions and verifications are aligned with the lesson submission flow and NFT generation.

Files included in this PR:

Testing Performed

The following tests were conducted:

  1. Modal Content Display: Verifies displayed elements and the ability to change text field content.
  2. submitLessonInFirestore Call in Modal: Tests lesson submission and calls the mintNFT function post-submission, ensuring lesson data is passed correctly.
  3. Submission Document Creation: Integration test to verify creation of a document in lessons_submissions and execution of the mintNFT trigger.

Related Issues

Checklist

vercel[bot] commented 2 weeks ago

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

Name Status Preview Comments Updated (UTC)
web3-bootcamp-platform ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 5:18pm