Flex-NFT-Marketplace / Flex-Marketplace-Contract

12 stars 45 forks source link

test: Write unit tests for Flex Haus Factory #115

Open 0xandee opened 1 month ago

0xandee commented 1 month ago

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

Use scarb test to run all the tests.

All test cases are required to PASS.

raizo07 commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I'll like to be assigned to work on this.

Mystic-Nayy commented 1 month 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 FlexHausFactory.cairo in the flex_haus/src/factory/ directory by adding test cases in the flex_haus/tests folder. I will run all tests using scarb test to ensure they function correctly.

Jemiiah commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I would love to work on this issue i'm a frontend web 3 developer i contributed to this repository before in the last OD Hack and would love to do so this OD Hack i have over 55+ contributions

How I plan on tackling this issue

I will start by reviewing the FlexHausFactory.cairo contract in flex_haus/src/factory to get a clear understanding of what each function does and identify which ones require testing. This will guide the test scenarios.

I’ll then head to the flex_haus/tests folder. If the folder or structure is missing, I’ll create it and add the necessary test files.

For each function, I’ll write unit tests to cover both normal and edge cases, ensuring test coverage. within an ETA of 48 hours

jedstroke commented 1 month 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

I will pass all the tests with an ETA of 1 - 2 days.

codeZe-us commented 1 month 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

I will start by focusing on each public function then covering valid inputs and edge cases. Also, I will use mocks for external dependencies to isolate functionality and assert state changes and events then verify access control to ensure only authorized users can execute sensitive functions.

CollinsC1O commented 1 month 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. I can handle this

martinvibes commented 1 month 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 :)

DiegoB1911 commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a Full Stack Developer with two years of experience. I'm also a member of Dojo Coding, where I'm expanding my expertise in Cairo and Web3 technologies.

How I plan on tackling this issue

To solve this, I will:

  1. Analyze the contract functionality.
  2. Create a setup function to deploy the contract and initialize any necessary values for the test.
  3. Develop the unit tests to cover the contract functionalities.
  4. Verify that everything is working and document the code.
0xprivateChaos commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I bring 2 years of hands-on experience writing tests for Solidity smart contracts. Recently, I've expanded into Cairo development and testing, allowing me to bring valuable cross-chain perspective to the project. My solid theoretical understanding of blockchain fundamentals, combined with practical experience in both ecosystems, makes me well-equipped to write comprehensive tests for the Flex Haus Factory.

How I plan on tackling this issue

Key testing priorities:

1) Start with testing core business flows: test the main sequence of create_collectible -> create_drop -> claim_collectible, as this represents the primary user journey.

2) Test security features and access controls: verify the reentrancy guard, ownership checks, and the signature verification system in claim_collectible.

3) Test edge cases around timing constraints: particularly the update window restrictions (min_duration_time_for_update) and start time validations.

0xandee commented 1 month ago

GM @0xprivateChaos just checking in, how're you doing?

0xprivateChaos commented 1 month ago

Hey @0xandee, I am working on it. Will raise PR soon

Oshioke-Salaki commented 3 weeks ago

Hello No PR has been raised yet. Can i take this up? @0xandee

No-bodyq commented 2 weeks ago

Hey @0xandee can I work on this please