Skip to content

librecapital/qa-challenge

Repository files navigation

QA Libre Challenge

Table of Contents

Requirements

Fork this repository and create a comprehensive suite of end-to-end (e2e) tests for a decentralized application (DApp) that interacts with a smart contract on the Sepolia Testnet. The DApp consists of a smart contract and a Next.js frontend application. You can access the DApp from https://qa-challange.netlify.app.

Test Suite Structure

Organize this project as you prefer. Inside the folder e2e you will find the the feature files, which following the Gherkin syntax for behavior-driven development (BDD). Use the following existing feature files as a basis for this challenge:

  • 01-app-access.feature
  • 02-search-erc20-token.feature
  • 03-deposit-erc20-token.feature

Expectations

  • Test the connection to the user's wallet (e.g., MetaMask)
  • Verify that the ERC20 token address input field works correctly
  • Test the display of the current token balance
  • Test the token transfer process from the wallet to the smart contract
  • Execute the e2e tests using a GitHub Actions workflow
  • Document how to run tests
  • Be proactive in providing feedback in an MD document about this exercise and share your thoughts on what other aspects should be taken care of to ensure a good level of quality for a web application
  • [Bonus] Display test results in an easily shareable format

Project Information

This is a Next.js project that uses the Web3 library to interact with the MetaMask wallet and perform actions by calling smart contract methods.

To use this application, you need to:

  1. Install MetaMask on your browser (Download MetaMask)
  2. Connect MetaMask to the Sepolia testnet

Add Sepolia network to MetaMask

Network Name: Sepolia RPC URL: https://sepolia.infura.io/v3/ Chain ID: 11155111 Currency Symbol: SepoliaETH Block Explorer URL (Optional): https://sepolia.etherscan.io

Get free ETH from these faucets:

Example ERC20 Token

The application allows interaction with ERC20 tokens deployed on the Sepolia testnet. For testing purposes, you can use our example ERC20 token deployed at:

0x9982f9A3bA28c34aD03737745d956EC0668ea440

By selecting this token, the application will allow you to mint 100 tokens at a time.

Local Environment Setup

Run with Docker Compose

  1. Open a terminal at the root path of this project

  2. Execute the following command:

    docker-compose up -d
  3. Access the application at http://localhost:3000 using your browser

Run with Node.js

  1. Open a terminal at the root path of this project

  2. Execute the following commands:

    npm install
    npm run build && npm run start
  3. Access the application at http://localhost:3000 using your browser

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published