-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(e2e-tests): add e2e-tests for
/accounts/{accoundId}/validate
(#731
) * add ValidateAddressService * add ValidateAddressController * add AccountsValidate to polkadot, westend, and kusama * imports * add kusama chain config * fix response * fix networkInfo bug * lint * get tests started * change the name of the service * cleanup, lint, fix build, test boilerplate * update the tests * more tests * use hexToU8a for hex conversion * add tests for hex values * cleanup * docs * e2e tests for validate * update e2e responses * update docs * Update docs/src/openapi-v1.yaml Co-authored-by: David <dvdplm@gmail.com> * docs Co-authored-by: David <dvdplm@gmail.com>
- Loading branch information
Showing
11 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { kusamaAccountBalanceEndpoints } from './balance-info'; | ||
import { kusamaAccountValidateEndpoints } from './validate'; | ||
import { kusamaAccountVestingInfoEndpoints } from './vesting-info'; | ||
|
||
export const kusamaAccountsEndpoints = [ | ||
...kusamaAccountBalanceEndpoints, | ||
...kusamaAccountVestingInfoEndpoints, | ||
...kusamaAccountValidateEndpoints, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import validKusama from './validKusama.json'; | ||
|
||
const validKusamaStringify = JSON.stringify(validKusama); | ||
|
||
export const kusamaAccountValidateEndpoints = [ | ||
[ | ||
'/accounts/DXgXPAT5zWtPHo6FhVvrDdiaDPgCNGxhJAeVBYLtiwW9hAc/validate', | ||
validKusamaStringify, | ||
], | ||
[ | ||
'/accounts/0x02ce046d43fc4c0fb8b3b754028515e5020f5f1d8d620b4ef0f983c5df34b1952909e9/validate', | ||
validKusamaStringify, | ||
], | ||
]; |
4 changes: 4 additions & 0 deletions
4
e2e-tests/endpoints/kusama/accounts/validate/validKusama.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"isValid": true, | ||
"ss58Prefix": "2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { polkadotAccountBalanceEndpoints } from './balance-info'; | ||
import { polkadotAccountValidateEndpoints } from './validate'; | ||
import { polkadotAccountVestingInfoEndpoints } from './vesting-info'; | ||
|
||
export const polkadotAccountsEndpoints = [ | ||
...polkadotAccountBalanceEndpoints, | ||
...polkadotAccountVestingInfoEndpoints, | ||
...polkadotAccountValidateEndpoints, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import validPolkadot from './validPolkadot.json'; | ||
|
||
const validPolkadotStringify = JSON.stringify(validPolkadot); | ||
|
||
export const polkadotAccountValidateEndpoints = [ | ||
[ | ||
'/accounts/1xN1Q5eKQmS5AzASdjt6R6sHF76611vKR4PFpFjy1kXau4m/validate', | ||
validPolkadotStringify, | ||
], | ||
[ | ||
'/accounts/0x002a39366f6620a6c2e2fed5990a3d419e6a19dd127fc7a50b515cf17e2dc5cc592312/validate', | ||
validPolkadotStringify, | ||
], | ||
]; |
4 changes: 4 additions & 0 deletions
4
e2e-tests/endpoints/polkadot/accounts/validate/validPolkadot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"isValid": true, | ||
"ss58Prefix": "0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { westendAccountBalanceEndpoints } from './balance-info'; | ||
import { westendAccountValidateEndpoints } from './validate'; | ||
import { westendAccountVestingInfoEndpoints } from './vesting-info'; | ||
|
||
export const westendAccountsEndpoints = [ | ||
...westendAccountBalanceEndpoints, | ||
...westendAccountVestingInfoEndpoints, | ||
...westendAccountValidateEndpoints, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import validWestend from './validWestend.json'; | ||
|
||
const validWestendStringify = JSON.stringify(validWestend); | ||
|
||
export const westendAccountValidateEndpoints = [ | ||
[ | ||
'/accounts/5CdnmxQUfK6WPreBauvetcLh5PZL4RMPHrtd3nPQpQ9Z2qCS/validate', | ||
validWestendStringify, | ||
], | ||
[ | ||
'/accounts/0x2a193ba804b76499944080c91b8b38b749a482471c317ab8bfa43f52d5ff9c04c7f6bf/validate', | ||
validWestendStringify, | ||
], | ||
]; |
4 changes: 4 additions & 0 deletions
4
e2e-tests/endpoints/westend/accounts/validate/validWestend.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"isValid": true, | ||
"ss58Prefix": "42" | ||
} |