Skip to content

Commit

Permalink
test: adds playwright test for svelte project (#4049)
Browse files Browse the repository at this point in the history
  • Loading branch information
krpeacock authored Jan 7, 2025
1 parent c03e41a commit 060e103
Show file tree
Hide file tree
Showing 9 changed files with 638 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,23 @@ jobs:
--frontend_url "$FRONTEND_URL_LOCALHOST" \
--candid_url "$CANDID_URL_LOCALHOST" \
--browser chromium firefox webkit
- name: Deploy sveltekit starter project
run: |
dfx new e2e_project_sveltekit --frontend sveltekit
pushd e2e_project_sveltekit
dfx canister create e2e_project_sveltekit_frontend --specified-id erxue-5aaaa-aaaab-qaagq-cai
dfx deploy
rm -rf e2e_project_sveltekit
popd
# Add any additional deployments here
- name: Install Playwright Browsers and Run Tests
run: |
pushd e2e/playwright/
npm install
npx playwright install --with-deps
npx playwright test
popd
aggregate:
name: e2e:required
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# UNRELEASED

### test: adds playwright test for svelte `dfx new` project

The first of a suite of baseline tests to automate testing starter projects. Makes sure they are compatible with other dfx or asset canister changes.

### fix: template frontends now have unsupported browser warnings

DFX's default security headers cause Safari to break when viewing local canisters. Warning messages
Expand Down
4 changes: 2 additions & 2 deletions docs/cli-reference/dfx-canister.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1217,10 +1217,10 @@ dfx canister url hello_world_backend
The command displays output similar to the following:

``` bash
http://127.0.0.1:4943/?canisterId=br5f7-7uaaa-aaaaa-qaaca-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai
http://127.0.0.1:4943/?canisterId=erxue-5aaaa-aaaab-qaagq-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai
```

The `br5f7-7uaaa-aaaaa-qaaca-cai` is the local canister id for `__Candid_UI` canister. You need to run `dfx deploy`
The `erxue-5aaaa-aaaab-qaagq-cai` is the local canister id for `__Candid_UI` canister. You need to run `dfx deploy`
to generate the local `__Candid_UI` entry in `.dfx/local/canister_ids.json` first.

If you run:
Expand Down
5 changes: 5 additions & 0 deletions e2e/playwright/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
Loading

0 comments on commit 060e103

Please sign in to comment.