Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: adds playwright test for svelte project #4049

Merged
merged 16 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading