Ensure the following tools are installed on your machine:
- Git
- Node.js & npm
git clone https://github.com/IntersectMBO/govtoolcd govtool/tests/govtool-frontend/playwright-
Copy the example file:
cp .env.example .env
-
Update the
.envfile with the appropriate values for your environment.
npm installnpx playwright install| Environment | URL | Network |
|---|---|---|
| Development | https://p80-z78acf3c2-zded6a792-gtw.z937eb260.rustrocks.fr | Preview |
| QA | https://govtool.cardanoapi.io | Preview |
| Preview | https://preview.gov.tools | Preview |
| Pre-Prod | https://pre-prod.gov.tools | Preprod |
| Mainnet | https://gov.tools | Mainnet |
-
To generate a Blockfrost API key (Project ID):
- Follow the instructions in the Blockfrost documentation π.
- The Project ID you create there serves as your Blockfrost API Key.
- Copy the Project ID and set it as
BLOCKFROST_API_KEY.
π Note: Ensure you select the correct network for the Project ID that matches the host URL from the environment listed above.
- To generate a Kuber API Key:
- Visit Kuberide π.
- Log in using your Google or GitHub account.
- Navigate to API Keys βοΈ.
- Click to Generate API Key β¨.
- Copy the API key and set it as
KUBER_API_KEY
This section guides you through generating a Cardano faucet wallet and configuring it for use. Follow the steps below to create and set the config on env
Run the following command to generate a new faucet wallet:
npm run generate-faucet-walletThe script will:
- Display the wallet details (payment private key, stake public key hash, and wallet address) in the terminal.
Example Output:
π Wallet generated successfully!
-----------------------------------
π Payment Private Key: <your-payment-private-key>
π° Stake Private Key: <your-stake-private>
π Wallet Address: <your-wallet-address>
-----------------------------------
π Please copy the following to your environment variables:
1. Set FAUCET_PAYMENT_PRIVATE=<your-payment-private-key>
2. Set FAUCET_STAKE_PRIVATE=<your-stake-private>
3. Set FAUCET_ADDRESS=<your-wallet-address>
π All set! Please ensure this wallet is funded with a sufficient balance
Securely store the generated wallet details in your environment variables. Add the following to your .env file or environment configuration:
FAUCET_PAYMENT_PRIVATE=<your-payment-private-key>
FAUCET_STAKE_PKH=<your-stake-pkh>
FAUCET_ADDRESS=<your-wallet-address>Ensure your wallet has enough funds for your test runs. The required balance depends on the specific tests you plan to execute (see test-specific details below).
To fund your wallet on the Preview or Preprod network:
-
Use the Cardano Testnet Faucet:
https://docs.cardano.org/cardano-testnets/tools/faucet π
Note: There is a daily limit of 10,000 ADA per wallet. -
If the funded amount is insufficient, transfer additional ADA from another wallet. πΈ
To check your wallet balance:
Visit:
https://${network}.cardanoscan.io/address/<your-wallet-address>
- Replace
${network}with the appropriate network (e.g.,preprodorpreview). - Replace
<your-wallet-address>with your wallet address. π
Example:
- For a preview wallet:
https://preview.cardanoscan.io/address/<your-wallet-address> - Monitor the balance to ensure it meets the requirements for individual or all test runs.
Before each test run, generate test wallets required for wallet-dependent tests:
npm run generate-wallets- Pre-requisite: Ensure the faucet address holds at least 512,000 ADA.
npm run testnpm run test:headlessEach test suite can be run in UI or Headless mode.
- Pre-requisite: Ensure the faucet address holds at least 12,000 ADA.
npm run test:delegation-pillarnpm run test:headless:delegation-pillar- Pre-requisite: Ensure the faucet address holds at least 12,000 ADA.
npm run test:voting-pillarnpm run test:headless:voting-pillarnpm run test:outcomesnpm run test:headless:outcomesIncludes both Proposal Discussion and Budget Discussion
- Pre-requisite: Ensure the faucet address holds at least 403,000 ADA.
npm run test:proposal-pillarnpm run test:headless:proposal-pillar- Pre-requisite: Ensure the faucet address holds at least 501,000 ADA.
npm run test:proposal-discussionnpm run test:headless:proposal-discussion- Pre-requisite: Ensure the faucet address holds at least 1,000 ADA.
npm run test:proposal-budgetnpm run test:headless:proposal-budgetnpm run test:wallet-connectnpm run test:headless:wallet-connectnpm run test:usersnapnpm run test:headless:usersnapnpm run test:miscnpm run test:headless:miscTo generate and view an Allure test report:
npm run allure:serveFor contribution guidelines and development tips, refer to:
π DEVELOPERS_GUIDE.md