Skip to content

Commit

Permalink
fix: remove whitespaces around extension id (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Nov 15, 2024
2 parents b2d598a + 1488846 commit 221d49c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 29 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/e2e_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # pin@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # pin@v1

- name: Cache Docker layers
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
uses: actions/checkout@v4

- name: Run e2e tests (${{ matrix.resolution }} res)
run: |
docker-compose -f docker-compose.ci.keplr.yml --env-file ${{ matrix.resolution }}-res.env --profile synpress up --build --exit-code-from synpress
docker compose -f docker-compose.ci.keplr.yml --env-file ${{ matrix.resolution }}-res.env --profile synpress up --build --exit-code-from synpress
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
Expand All @@ -61,7 +47,7 @@ jobs:
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }}

- name: Archive e2e artifacts (${{ matrix.resolution }} res)
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-artifacts-${{ matrix.resolution }}-res
Expand Down
2 changes: 1 addition & 1 deletion commands/keplr.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const keplr = {
async getExtensionDetails() {
const keplrExtensionData = (await playwright.getExtensionsData()).keplr;

extensionId = keplrExtensionData.id;
extensionId = keplrExtensionData.id.trim();
extensionVersion = keplrExtensionData.version;
registrationUrl = `chrome-extension://${extensionId}/register.html`;
permissionsUrl = `chrome-extension://${extensionId}/popup.html#/setting/security/permission`;
Expand Down
2 changes: 1 addition & 1 deletion commands/playwright-keplr.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module.exports = {
} else if (
page
.url()
.includes(`chrome-extension://${keplrExtensionData.id}/register.html`)
.includes(`chrome-extension://${keplrExtensionData.id.trim()}/register.html`)
) {
keplrWindow = page;
}
Expand Down
15 changes: 14 additions & 1 deletion docker-compose.ci.keplr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,20 @@ 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 && pnpm test:e2e:ci:keplr'
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 &&
# Start development server and wait for it to be ready
VITE_RUN_ENV=agoric_chain pnpm start:ui & sleep 5 &&
# start json server
pnpm start:json-server & sleep 5 &&
# Run end-to-end tests
pnpm synpress:run:keplr'
networks:
- x11

Expand Down
9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,7 @@
"start:ui": "cd tools/ui && pnpm dev",
"start:json-server": "json-server tools/json-server-db.json --port 3004",
"synpress:run:metamask": "CYPRESS_SPEC_PATTERN=tests/e2e/specs/metamask/** EXTENSION=metamask SKIP_EXTENSION_SETUP=true SYNPRESS_LOCAL_TEST=true node synpress.js run --configFile=synpress.config.js",
"test:e2e:metamask": "start-server-and-test 'pnpm start:server' http-get://localhost:3000 'pnpm synpress:run:metamask'",
"test:e2e:anvil": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'CYPRESS_USE_ANVIL=true pnpm synpress:run'",
"test:e2e:headless": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'pnpm synpress:run --headless'",
"test:e2e:headless:anvil": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'CYPRESS_USE_ANVIL=true pnpm synpress:run --headless'",
"test:e2e:ci": "start-server-and-test 'VITE_RUN_ENV=agoric_chain pnpm start:ui' http-get://localhost:3000 'pnpm start:json-server' http-get://localhost:3004 'pnpm synpress:run --record --group'",
"test:e2e:ci:keplr": "start-server-and-test 'VITE_RUN_ENV=agoric_chain pnpm start:ui' http-get://localhost:3000 'pnpm start:json-server' http-get://localhost:3004 'pnpm synpress:run:keplr'",
"test:e2e:ci:anvil": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'CYPRESS_USE_ANVIL=true pnpm synpress:run --record --group'",
"test:e2e:ci:cypress-action": "CYPRESS_USE_ANVIL=true pnpm synpress:run",
"synpress:run:keplr": "CYPRESS_SPEC_PATTERN=tests/e2e/specs/keplr/** EXTENSION=keplr SKIP_EXTENSION_SETUP=true SYNPRESS_LOCAL_TEST=true node synpress.js run --configFile=synpress.config.js",
"test:e2e:keplr": "start-server-and-test 'pnpm start:ui' http-get://localhost:3000 'pnpm start:json-server' http-get://localhost:3004 'pnpm synpress:run:keplr'",
"prepare": "husky"
},
"dependencies": {
Expand Down

0 comments on commit 221d49c

Please sign in to comment.