Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
26ba1b6
test: add outcome test on loggedIn state
kneerose Apr 28, 2025
e11e578
docs: update Playwright test guide with setup and running instructions
kneerose Apr 24, 2025
71908da
docs: add Developer's Guide with project structure and test organization
kneerose Apr 24, 2025
25c7cc6
docs: add instructions for generating test wallets to avoid conflicts
kneerose Apr 25, 2025
366ffac
chore: add test scripts for running microservice tests
kneerose Apr 25, 2025
4dd17db
chore: update environment configuration and remove unused PDF_URL
kneerose Apr 25, 2025
8930261
chore: update Playwright test scripts to include headless options
kneerose Apr 25, 2025
2193825
docs: enhance Developer's Guide with vscode instructions
kneerose Apr 25, 2025
761d6d4
docs: update Playwright README for headless run
kneerose Apr 25, 2025
e3509a1
chore: update Playwright test command of workflow file to run in head…
kneerose Apr 25, 2025
94efd03
docs: update Playwright README to clarify requirements for each test …
kneerose Apr 25, 2025
51c0d36
docs: update requirements for Delegation and Voting Pillars test suit…
kneerose Apr 25, 2025
70bd072
docs: update directory path in Playwright README for clarity
kneerose Apr 25, 2025
1d82da4
docs: enhance README with environment setup and API key generation in…
kneerose Apr 28, 2025
39ef2df
fix: remove file extension for outcome test
kneerose Apr 29, 2025
0d35083
fix: test execution in workflow
kneerose Apr 29, 2025
3e00191
Merge pull request #3541 from IntersectMBO/feat/outcome-loggedin
kneerose Apr 29, 2025
f6c000a
fix: correc costing typos and add check for 'Other' contracting content
kneerose Apr 30, 2025
51f4e36
fix: retry metadata download action if event is not triggered
kneerose Apr 30, 2025
8f90ef9
refactor: metadata anchor validation
kneerose Apr 30, 2025
58b05d5
chore: move image file to docs
kneerose Apr 30, 2025
23f82ad
fix: clarify test description for invalid outcome metadata in disconn…
kneerose Apr 30, 2025
e9f4244
Merge pull request #3555 from IntersectMBO/fix/report-400-issue
kneerose May 1, 2025
2afbb2e
Add branch restriction to integration test workflow
mesudip May 4, 2025
7331f67
Merge pull request #3562 from IntersectMBO/hotfix/playwright-workflow
mesudip May 4, 2025
1ddca4d
Merge pull request #3542 from IntersectMBO/docs/readme-developer-guide
kneerose May 5, 2025
758f4e0
feat: add helper function to check walletBalance and skip if walletBa…
kneerose Apr 29, 2025
7b83cb7
feat: add faucetWalletBalance.json to .gitignore
kneerose Apr 29, 2025
0d77e23
chore: check skipIfBalanceInsufficient for all faucet dependent test
kneerose Apr 29, 2025
54d8fb4
chore: remove generated/proposal faucet wallet and use wallet from co…
kneerose May 1, 2025
844f59a
chore: balance checks in setup and teardown before setup/teardown
kneerose May 1, 2025
a9ae9b5
chore: skip temporary wallet dependent tests if it is not available
kneerose May 1, 2025
2833b92
fix: correct calculation of total required balance for temporary DRep…
kneerose May 1, 2025
3ba4d5a
docs: update README to clarify ADA requirements for faucet address in…
kneerose May 1, 2025
8979278
chore: update env variables on integration test workflow
kneerose May 1, 2025
62b10ef
chore: update .gitignore to remove leading dot from lock_logs.txt entry
kneerose May 1, 2025
0ccbd48
fix: divide dRepDeposit and govActionDeposite to calculate the requir…
kneerose May 1, 2025
10a7a0d
chore: remove unnecessary "/" from host urls
kneerose May 1, 2025
9e2ba7f
refactor: remove unused transaction test configuration from Playwrigh…
kneerose May 2, 2025
3476fc4
chore: check balance from kuber directly
kneerose May 2, 2025
5b086b9
feat: add delete file/folder helper function
kneerose May 2, 2025
effa140
chore: check copy temporary wallets instead of used temporary wallets
kneerose May 2, 2025
7fd7e67
feat: add cleanup artifacts functionality to Playwright tests
kneerose May 2, 2025
fa2c6bf
chore: update default deployment option in Playwright integration tests
kneerose May 2, 2025
bce9288
refactor: rename proposal budget config to budget proposal
kneerose May 2, 2025
a89daed
chore: add playwright project configuration architecture on developer…
kneerose May 2, 2025
f2e6d3f
refactor: dRep registration tests to use generated valid and invalid …
kneerose May 2, 2025
3d5060d
fix: update delegation pillars image reference and replace outdated file
kneerose May 5, 2025
8f3b803
refactor: remove unused skipIfBalanceIsInsufficient import
kneerose May 5, 2025
3727bd3
cleanup: remove unnecessary cardano-test-wallet directory
kneerose May 5, 2025
1e9a59e
fix: correct URL construction in DrepListFetcher
kneerose May 5, 2025
9c7074c
docs: add README for GovTool tests directory
kneerose May 5, 2025
18710f8
refactor: consolidate outcome ID and title fetching into a single method
kneerose May 5, 2025
bce32eb
chore: update @intersect.mbo/pdf-ui to 0.7.0-beta-25
github-actions[bot] May 5, 2025
6163f89
chore: revert default test trigger host url to govtool.cardanoapi.io
kneerose May 5, 2025
3a0efd6
Merge pull request #3564 from IntersectMBO/refactor/project-structure
kneerose May 5, 2025
bbf6853
Merge pull request #3566 from IntersectMBO/docs/tests-readme
kneerose May 5, 2025
b479b0b
Merge pull request #3565 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m May 5, 2025
d9ea3ce
fix: add branch restriction to the backend test workflow file
kneerose May 5, 2025
3251061
chore: add wallet address on error message for missing FAUCET_API_KEY…
kneerose May 5, 2025
cc46388
chore: update @intersect.mbo/govtool-outcomes-pillar-ui to 1.4.1
github-actions[bot] May 5, 2025
8403011
Merge pull request #3569 from IntersectMBO/chore/@intersect.mbo/govto…
bosko-m May 5, 2025
590c338
Merge pull request #3567 from IntersectMBO/fix/backend-test-security-…
kneerose May 6, 2025
8c3f1a6
fix: update image paths in Developer's Guide for correct relative ref…
kneerose May 6, 2025
fe2d111
chore: make pillar singular on readme
kneerose May 6, 2025
2e4bee7
Merge pull request #3573 from IntersectMBO/fix/readme-issue
kneerose May 6, 2025
b980db7
feat: add wallet generation script for faucet
kneerose May 6, 2025
4896bfb
feat: add faucet wallet generation instructions to README
kneerose May 6, 2025
7241743
fix: update README for generation of test wallets and correct singula…
kneerose May 6, 2025
04918ab
chore: update generate faucet wallet success message
kneerose May 6, 2025
9967f98
Merge pull request #3574 from IntersectMBO/feat/fauct-env-config
kneerose May 6, 2025
8d5ab22
Merge pull request #3577 from IntersectMBO/develop
bosko-m May 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ on:
workflow_run:
workflows: ["Build and deploy GovTool test stack"]
types: [completed]
branches:
- test
- infra/test-chores

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/test_integration_playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- "sanchogov.tools"
- "staging.govtool.byron.network"
- "govtool.cardanoapi.io"
- "p80-z6b8d2f7a-ze34e4cb2-gtw.z937eb260.rustrocks.fr"
- "preview.gov.tools"
- "gov.tools"
- "p80-z78acf3c2-zded6a792-gtw.z937eb260.rustrocks.fr"
Expand All @@ -32,6 +33,9 @@ on:
workflow_run:
workflows: ["Build and deploy GovTool test stack"]
types: [completed]
branches:
- test
- infra/test-chores

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -90,20 +94,16 @@ jobs:

# Set API keys based on the network
if [[ "${{ env.NETWORK }}" == "preprod" ]]; then
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_PREPROD }}"
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_PREPROD }}"
elif [[ "${{ env.NETWORK }}" == "sanchonet" ]]; then
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_SANCHONET }}"
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_SANCHONET }}"
elif [[ "${{ env.NETWORK }}" == "preview" ]]; then
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_PREVIEW }}"
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_PREVIEW }}"
else
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_PREVIEW }}"
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_MAINNET }}"
fi

npm test
npm run test:headless

- name: Upload report
uses: actions/upload-artifact@v4
Expand All @@ -120,17 +120,15 @@ jobs:
path: tests/govtool-frontend/playwright/lock_logs.txt

env:
API_URL: https://${{inputs.deployment || 'govtool.cardanoapi.io' }}/api
DOCS_URL: ${{ vars.DOCS_URL }}
KUBER_API_KEY: ${{secrets.KUBER_API_KEY}}
NETWORK: ${{ inputs.network || vars.NETWORK }}
TEST_WORKERS: ${{vars.TEST_WORKERS}}
CI: ${{vars.CI}}
FAUCET_ADDRESS: ${{vars.FAUCET_ADDRESS}}
CARDANOAPI_METADATA_URL: ${{vars.CARDANOAPI_METADATA_URL}}
PROPOSAL_FAUCET_PAYMENT_PRIVATE: ${{secrets.PROPOSAL_FAUCET_PAYMENT_PRIVATE}}
PROPOSAL_FAUCET_STAKE_PRIVATE: ${{secrets.PROPOSAL_FAUCET_STAKE_PRIVATE}}
PROPOSAL_FAUCET_DREP_PRIVATE: ${{secrets.PROPOSAL_FAUCET_DREP_PRIVATE}}
FAUCET_PAYMENT_PRIVATE: ${{secrets.FAUCET_PAYMENT_PRIVATE}}
FAUCET_STAKE_PKH: ${{secrets.FAUCET_STAKE_PKH}}

publish-report:
runs-on: ubuntu-latest
Expand Down
16 changes: 8 additions & 8 deletions govtool/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions govtool/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"@emotion/styled": "^11.11.0",
"@emurgo/cardano-serialization-lib-asmjs": "^14.1.1",
"@hookform/resolvers": "^3.3.1",
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.4.0",
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.4.1",
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
"@intersect.mbo/pdf-ui": "0.7.0-beta-24",
"@intersect.mbo/pdf-ui": "0.7.0-beta-25",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.4",
"@rollup/plugin-babel": "^6.0.4",
Expand Down
16 changes: 8 additions & 8 deletions govtool/frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1492,10 +1492,10 @@
resolved "https://registry.npmjs.org/@inquirer/type/-/type-3.0.4.tgz"
integrity sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==

"@intersect.mbo/[email protected].0":
version "1.4.0"
resolved "https://registry.npmjs.org/@intersect.mbo/govtool-outcomes-pillar-ui/-/govtool-outcomes-pillar-ui-1.4.0.tgz"
integrity sha512-iSg6FzeUW4F3KSQDcHCytggCG68Q4OKUzQa8yNMSPVAuM6w5I6LhaqEYRO8x02G8WPyE+8W+Q9m3SCFea59osg==
"@intersect.mbo/[email protected].1":
version "1.4.1"
resolved "https://registry.npmjs.org/@intersect.mbo/govtool-outcomes-pillar-ui/-/govtool-outcomes-pillar-ui-1.4.1.tgz"
integrity sha512-cev6uUOiWH2KY4ozv17oxGkfonQ2oLDTlpcqU7HFntekUPwjEx0rOqaZPakGShxR6rb+GrBJ4Y7Vnf1bBk2Otg==
dependencies:
"@fontsource/poppins" "^5.0.14"
"@intersect.mbo/intersectmbo.org-icons-set" "^1.0.8"
Expand All @@ -1512,10 +1512,10 @@
resolved "https://registry.npmjs.org/@intersect.mbo/intersectmbo.org-icons-set/-/intersectmbo.org-icons-set-1.1.0.tgz"
integrity sha512-sjKEtnK9eLYH/8kCD0YRQCms3byFA/tnSsei9NHTZbBYX9sBpeX6ErfR0sKYjOSxQOxl4FumX9D0X+vHIqxo8g==

"@intersect.mbo/[email protected]24":
version "0.7.0-beta-24"
resolved "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-0.7.0-beta-24.tgz"
integrity sha512-o/3thkna2DQjvtiSqMf4KHN2XgDQN8qHVRklF3VRVhPue8y99IWtbji0nhlvhoYDqmdEVL/3Nmrt9Xom3QjHwg==
"@intersect.mbo/[email protected]25":
version "0.7.0-beta-25"
resolved "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-0.7.0-beta-25.tgz"
integrity sha512-TDeWjJVMvLOR6sgTT6bCoHspZbybiRH0C5OzDDaU1yLSFD7xKx1aW5eAVdG0uzxrO+C0X7ceBGFoN5ucHICdlg==
dependencies:
"@emurgo/cardano-serialization-lib-asmjs" "^12.0.0-beta.2"
"@fontsource/poppins" "^5.0.14"
Expand Down
26 changes: 26 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# GovTool Tests

This directory contains tests for the GovTool project.

## 📍 Navigation

- [Backend Tests](./govtool-backend/)
- [Frontend Tests](./govtool-frontend/playwright/)
- [Load Tests](./load-testing/)
- [Test Infrastructure](./test-infrastructure/)
- [Metadata API](./test-metadata-api/)

## Backend Tests
- Conducts basic tests on GovTool backend endpoints using Python.

## Frontend Tests
- Performs integration tests on the deployed GovTool platform using Playwright.

## Load Tests
- Executes load tests on the GovTool API using Gatling.

## Test Infrastructure
- Includes Docker Compose files and scripts to deploy and manage the GovTool test environment.

## Metadata API
- A simple service to host JSON metadata during testing.
2 changes: 0 additions & 2 deletions tests/cardano-test-wallet/index.js

This file was deleted.

23 changes: 0 additions & 23 deletions tests/cardano-test-wallet/index.js.LICENSE.txt

This file was deleted.

55 changes: 0 additions & 55 deletions tests/cardano-test-wallet/types.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tests/govtool-backend/lib/faucet_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def from_env():
api_key = FACUET_API_KEY
base_url = FAUCET_API_URL
if not api_key:
raise ValueError("FAUCET_API_KEY environment variable not set.")
raise ValueError("FAUCET_API_KEY environment variable not set. Please set this variable or fund missing balance to the wallet address: addr_test1qzc97zml9xzhm7xcsmqretkk7ztzyehj3dpd7ph7h0s40wp0ea9f3e353pmmr7yxv7m2dj09rn44m7pvd0m4cylusn8szlm75t")
return CardanoFaucet(api_key, base_url)

def send_money(self, address: str, tx_type: str = "default") -> Transaction:
Expand Down
18 changes: 4 additions & 14 deletions tests/govtool-frontend/playwright/.env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
HOST_URL=http://localhost:3000
API_URL=http://localhost:3000/api

DOCS_URL=https://docs.gov.tools


PDF_URL=https://dev.api.pdf.gov.tools

# Faucet
FAUCET_API_KEY=

#Blockfrost
BLOCKFROST_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXX

Expand All @@ -21,12 +14,9 @@ TX_TIMEOUT=240000 # milliseconds
# Metadata Bucket
METADATA_BUCKET_URL=https://metadata-govtool.cardanoapi.io

FAUCET_ADDRESS=addr_test1vqeux7xwusdju9dvsj8h7mca9aup2k439kfmwy773xxc2hcu7zy99


PROPOSAL_FAUCET_PAYMENT_PRIVATE=**********************************************
PROPOSAL_FAUCET_STAKE_PRIVATE=**********************************************
PROPOSAL_FAUCET_DREP_PRIVATE=**********************************************
FAUCET_ADDRESS=
FAUCET_PAYMENT_PRIVATE=
FAUCET_STAKE_PKH=

CI=true
TEST_WORKERS=6
TEST_WORKERS=6 // Number of workers to run in parallel
3 changes: 2 additions & 1 deletion tests/govtool-frontend/playwright/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ lib/_mock/registeredDRepCopyWallets.json
lib/_mock/wallets.json
lib/_mock/proposals.json
lib/_mock/protocolParameter.json
./lock_logs.txt
lib/_mock/faucetWalletBalance.json
lock_logs.txt
Loading