Skip to content

Commit

Permalink
using a less likely canister id
Browse files Browse the repository at this point in the history
  • Loading branch information
krpeacock committed Jan 7, 2025
1 parent 0ccfe7e commit 87a8346
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ jobs:
run: |
dfx new e2e_project_sveltekit --frontend sveltekit
pushd e2e_project_sveltekit
dfx canister create e2e_project_sveltekit_frontend --specified-id br5f7-7uaaa-aaaaa-qaaca-cai
dfx canister create e2e_project_sveltekit_frontend --specified-id erxue-5aaaa-aaaab-qaagq-cai
dfx deploy
popd
# Add any additional deployments here
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
6 changes: 3 additions & 3 deletions e2e/playwright/tests/sveltekit.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { test, expect } from "@playwright/test";

test("has title", async ({ page }) => {
await page.goto("http://br5f7-7uaaa-aaaaa-qaaca-cai.localhost:4943/");
await page.goto("http://erxue-5aaaa-aaaab-qaagq-cai.localhost:4943/");

// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/IC Hello Starter/);
});

test("image has loaded", async ({ page }) => {
await page.goto("http://br5f7-7uaaa-aaaaa-qaaca-cai.localhost:4943/");
await page.goto("http://erxue-5aaaa-aaaab-qaagq-cai.localhost:4943/");

// Set the attribute so we can read it
await page.evaluate(async () => {
Expand All @@ -27,7 +27,7 @@ test("image has loaded", async ({ page }) => {
});

test("has hello form", async ({ page }) => {
await page.goto("http://br5f7-7uaaa-aaaaa-qaaca-cai.localhost:4943/");
await page.goto("http://erxue-5aaaa-aaaab-qaagq-cai.localhost:4943/");

// Fill out the form
const nameInput = await page.getByLabel("name");
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests-dfx/canister_url.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ teardown() {
@test "url subcommand prints valid backend canister urls on local" {
dfx_start
dfx canister create --all
jq '.__Candid_UI.local="br5f7-7uaaa-aaaaa-qaaca-cai"' .dfx/local/canister_ids.json | sponge .dfx/local/canister_ids.json
jq '.__Candid_UI.local="erxue-5aaaa-aaaab-qaagq-cai"' .dfx/local/canister_ids.json | sponge .dfx/local/canister_ids.json

backend_id=$(dfx canister id hello_backend)
assert_command dfx canister url hello_backend
assert_match "canisterId=br5f7-7uaaa-aaaaa-qaaca-cai&id=${backend_id}"
assert_match "canisterId=erxue-5aaaa-aaaab-qaagq-cai&id=${backend_id}"

backend_id=$(dfx canister id hello_backend)
assert_command dfx canister url "$backend_id"
assert_match "canisterId=br5f7-7uaaa-aaaaa-qaaca-cai&id=${backend_id}"
assert_match "canisterId=erxue-5aaaa-aaaab-qaagq-cai&id=${backend_id}"
}

@test "url subcommand prints valid frontend canister urls from a subdirectory" {
Expand Down

0 comments on commit 87a8346

Please sign in to comment.