Skip to content

Commit 060e103

Browse files
authored
test: adds playwright test for svelte project (#4049)
1 parent c03e41a commit 060e103

File tree

9 files changed

+638
-5
lines changed

9 files changed

+638
-5
lines changed

.github/workflows/e2e.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,23 @@ jobs:
222222
--frontend_url "$FRONTEND_URL_LOCALHOST" \
223223
--candid_url "$CANDID_URL_LOCALHOST" \
224224
--browser chromium firefox webkit
225+
- name: Deploy sveltekit starter project
226+
run: |
227+
dfx new e2e_project_sveltekit --frontend sveltekit
228+
pushd e2e_project_sveltekit
229+
dfx canister create e2e_project_sveltekit_frontend --specified-id erxue-5aaaa-aaaab-qaagq-cai
230+
dfx deploy
231+
rm -rf e2e_project_sveltekit
232+
popd
233+
# Add any additional deployments here
234+
- name: Install Playwright Browsers and Run Tests
235+
run: |
236+
pushd e2e/playwright/
237+
npm install
238+
npx playwright install --with-deps
239+
npx playwright test
240+
popd
241+
225242
226243
aggregate:
227244
name: e2e:required

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
# UNRELEASED
44

5+
### test: adds playwright test for svelte `dfx new` project
6+
7+
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.
8+
59
### fix: template frontends now have unsupported browser warnings
610

711
DFX's default security headers cause Safari to break when viewing local canisters. Warning messages

docs/cli-reference/dfx-canister.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,10 +1217,10 @@ dfx canister url hello_world_backend
12171217
The command displays output similar to the following:
12181218

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

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

12261226
If you run:

e2e/playwright/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
/test-results/
3+
/playwright-report/
4+
/blob-report/
5+
/playwright/.cache/

0 commit comments

Comments
 (0)