diff --git a/.github/workflows/e2e_tests.yml b/.github/workflows/e2e_tests.yml index dcf2cda..7d4b25f 100644 --- a/.github/workflows/e2e_tests.yml +++ b/.github/workflows/e2e_tests.yml @@ -20,7 +20,7 @@ on: phrase: description: 'The mnemonic phrase for the account to use in testing' required: false - type: text + type: string concurrency: group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || @@ -57,8 +57,8 @@ jobs: docker-compose -f tests/e2e/docker-compose.yml --profile $SYNPRESS_PROFILE up --build --exit-code-from synpress env: # conditionals based on github event - SYNPRESS_PROFILE: ${{ env.IS_EMERYNET_TEST == 'true' && 'daily-tests' || 'synpress' }} - CYPRESS_AGORIC_NET: ${{ env.IS_EMERYNET_TEST == 'true' && 'emerynet' || 'local' }} + SYNPRESS_PROFILE: ${{ 'true' == 'true' && 'daily-tests' || 'synpress' }} + CYPRESS_AGORIC_NET: ${{ 'true' == 'true' && 'emerynet' || 'local' }} # for docker-compose.yml COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 diff --git a/package.json b/package.json index f9d88aa..aeac17a 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test": "vitest", "coverage": "vitest run --coverage", "test:e2e": "EXTENSION=keplr SKIP_EXTENSION_SETUP=true synpress run --configFile=tests/e2e/synpress.config.cjs", - "test:e2e:ci": "start-server-and-test 'yarn dev' http-get://localhost:5173 'yarn test:e2e'" + "test:e2e:ci": "yarn dev & sleep 10 && yarn test:e2e" }, "dependencies": { "react": "^18.2.0", diff --git a/tests/e2e/docker-compose.yml b/tests/e2e/docker-compose.yml index cd7de6b..f08cd7d 100644 --- a/tests/e2e/docker-compose.yml +++ b/tests/e2e/docker-compose.yml @@ -48,7 +48,7 @@ services: - ./docker/videos:/app/tests/e2e/videos - ./docker/screenshots:/app/tests/e2e/screenshots command: > - bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && pnpm wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && if [ "$CYPRESS_AGORIC_NET" == "local" ]; then nginx; fi && yarn test:e2e:ci' + bash -c 'pnpm wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && if [ "$CYPRESS_AGORIC_NET" == "local" ]; then nginx; fi && yarn test:e2e:ci' networks: - x11 @@ -104,7 +104,7 @@ services: profiles: - synpress container_name: agoric_chain - image: ghcr.io/agoric/agoric-3-proposals:main + image: ghcr.io/agoric/agoric-3-proposals:latest logging: driver: none platform: linux/amd64 diff --git a/tests/e2e/support.js b/tests/e2e/support.js index 86122a8..d9eb65e 100644 --- a/tests/e2e/support.js +++ b/tests/e2e/support.js @@ -1,19 +1,22 @@ import '@agoric/synpress/support/index'; import { FACUET_HEADERS, FACUET_URL, DEFAULT_TIMEOUT } from './utils'; -Cypress.Commands.add('provisionFromFaucet', (walletAddress, command, clientType) => { - cy.request({ - method: 'POST', - url: FACUET_URL, - body: { - address: walletAddress, - command, - clientType, - }, - headers: FACUET_HEADERS, - timeout: 4 * DEFAULT_TIMEOUT, - retryOnStatusCodeFailure: true, - }).then(resp => { - expect(resp.body).to.eq('success'); - }); -}); +Cypress.Commands.add( + 'provisionFromFaucet', + (walletAddress, command, clientType) => { + cy.request({ + method: 'POST', + url: FACUET_URL, + body: { + address: walletAddress, + command, + clientType, + }, + headers: FACUET_HEADERS, + timeout: 4 * DEFAULT_TIMEOUT, + retryOnStatusCodeFailure: true, + }).then(resp => { + expect(resp.body).to.eq('success'); + }); + } +);