Skip to content

Commit

Permalink
test: update tests to include devnet
Browse files Browse the repository at this point in the history
  • Loading branch information
frazarshad committed Aug 24, 2024
1 parent 1ec342f commit aba325a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/support.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import '@agoric/synpress/support/index';
import { FACUET_HEADERS, FACUET_URL, DEFAULT_TIMEOUT } from './utils';
import { FACUET_HEADERS, phrasesList, DEFAULT_TIMEOUT } from './utils';

const networkPhrases = phrasesList[Cypress.env('AGORIC_NET')];

Cypress.Commands.add(
'provisionFromFaucet',
(walletAddress, command, clientType) => {
cy.request({
method: 'POST',
url: FACUET_URL,
url: networkPhrases.faucetUrl,
body: {
address: walletAddress,
command,
Expand Down
10 changes: 8 additions & 2 deletions tests/e2e/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ export const phrasesList = {
psmNetwork: 'Agoric Emerynet',
token: 'ToyUSD',
isLocal: false,
faucetUrl: 'https://emerynet.faucet.agoric.net/go',
},
devnet: {
walletButton: 'li[data-value="devnet"]',
psmNetwork: 'Agoric Devnet',
token: 'USDC_axl',
isLocal: false,
faucetUrl: 'https://devnet.faucet.agoric.net/go',
},
local: {
walletButton: 'li[data-value="local"]',
Expand All @@ -15,8 +23,6 @@ export const phrasesList = {
},
};

export const FACUET_URL = 'https://emerynet.faucet.agoric.net/go';

export const FACUET_HEADERS = {
Accept:
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
Expand Down

0 comments on commit aba325a

Please sign in to comment.