Flex-NFT-Marketplace / Flex-Marketplace-Contract

10 stars 32 forks source link

test: Write unit tests for Flex Haus Collectible #116

Open 0xandee opened 2 hours ago

0xandee commented 2 hours ago

Complete the unit test of flex_haus/src/collectible/FlexHausCollectible.cairo, write test cases in flex_haus/tests folder.

Use scarb test to run all the tests.

All test cases are required to PASS.

Mystic-Nayy commented 2 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a web3 developer, I have expertise in smart contracts, decentralized technologies, and frameworks like React. I can build innovative dApps, contribute to open-source projects, educate others, and network with industry leaders to advance my career in the decentralized space.

How I plan on tackling this issue

I will complete the unit tests for FlexHausCollectible.cairo in the flex_haus/src/collectible/ directory by writing test cases in the flex_haus/tests folder. I will use scarb test to run all the tests and ensure they pass successfully.

Jemiiah commented 2 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a frontend web 3 developer I have contributed to this repository in the last OD Hack and would love to continue in that same trajectory with over 55 + contribution

How I plan on tackling this issue

First, I'll go through the FlexHausFactory.cairo contract in flex_haus/src/factory to understand what each function does and which ones need testing. This helps in figuring out what scenarios to cover in the tests.

Set Up the Testing Folder I will navigate to the flex_haus/tests folder. If the folder or basic structure isn't there, I'll create the necessary test files where all the unit tests will be written.

Write Unit Tests For each function in the contract, I'll write tests that cover both expected and edge-case scenarios. Here's a rough example of how a simple test could look:

Run the Tests Using Scarb Once the tests are written, I’ll run them using scarb test to check if everything works as expected. Any failed test will point out areas that need fixing or adjusting in the contract.

Refactor if Needed If any tests fail, I'll look into what's going wrong—whether it's the test logic or the contract itself—and make necessary adjustments. with an ETA of 48 hours

codeZe-us commented 2 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Mid level Cairo Developer

How I plan on tackling this issue

Create the test folder and file, then write test cases that cover all the key functions of the contract and ensure the tests verify the expected behavior for both success and failure scenarios and also include ownership checks, factory validation, and handling of reentrancy guard.

jedstroke commented 2 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a seasoned fullstack web3 developer. Here's my lil' portfolio: https://www.jedshock.com

How I plan on tackling this issue

My ETA: 30 hours I can take on this issue

CollinsC1O commented 1 hour ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello I'm a front-end and a blockchain developer. I will love to solve this issue. Its something I can handle

od-hunter commented 1 hour ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, please can I be assigned this please? This would be my first time contributing to this project and I would love to be the given the opportunity to contribute to this project please ser. I have experience in html, css, JavaScript,TypeScript and solidity, and Cairo. I'm very good at testing.

How I plan on tackling this issue

To solve this issue, I'll take the following steps:

  1. I'll first of all have to understand the FlexHausCollectible.cairo Contract. So I'll read thoroughly to understand the code inside flex_haus/src/collectible/FlexHausCollectible.cairo. I'll also iIdentify key functionalities, including the methods and logic implemented in the contract, such as minting, transferring collectibles, querying information.
  2. I'll ensure I have Scarb installed, which is the tool that I will use to compile and run the tests.
  3. I'll write unit tests(I'll create a new test file in the flex_haus/tests folder) that will cover all public methods and core functionality of the contract.
  4. Then I'll use the scarb test command to run all test cases.
  5. Lastly, I'll test to ensure that every function in the contract has been tested.

Please assign me, I'm ready to work.

blessingbytes commented 1 hour ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

My name is Blessing, i am a frontend developer and a web3 developer.

How I plan on tackling this issue

To effectively resolve this issue, i would start by interpreting any error messages from scarb test to figure out if it's a syntax issue, function mismatch, or logic error.

Fix Function Signatures: If there's a mismatch between the contract functions and test cases, I will help you align the function parameters correctly.

Check Constructor/Deployment: I will guide you to ensure the constructor and contract deployment in the tests are done correctly.

Balance and Transfer Issues: If there are errors with token balances or transfers, I will help debug and confirm the logic works as expected.

Event Emission: I will assist in ensuring events are emitted properly and guide you on how to verify this in tests.

Run Tests and Debug: I will help you run scarb test, interpret the results, and make necessary adjustments until all tests pass.

By following this approach , i aim to provide a realiable and efficient solution to make all the cases to pass

martinvibes commented 1 hour ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

hello i'm an experienced frontend developer and a blockchain developer i would love to work on this issue Pleasee kindly assign :)