Skip to content

Commit 8708ca4

Browse files
chore(e2e): run on test changes, fix setup and screenshots (#739)
* chore(e2e): run on test changes and screenshots * chore: install cli * fix: working dir * test: exclude e2e * test: sign-ii II v2 * 🤖 update tests screenshots * chore: lint * test: fix include --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 6208528 commit 8708ca4

File tree

11 files changed

+29
-21
lines changed

11 files changed

+29
-21
lines changed

.github/actions/setup-e2e-env/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ runs:
1010
shell: bash
1111

1212
- name: Install dependencies in demo
13-
run: npm ci --prefix demo
13+
shell: bash
14+
working-directory: demo
15+
run: npm ci
16+
17+
- name: Install Juno CLI
18+
run: npm i -g @junobuild/cli
1419
shell: bash
1520

1621
- name: Cache Docker layers
@@ -23,6 +28,7 @@ runs:
2328
2429
- name: Run emulator
2530
shell: bash
31+
working-directory: demo
2632
run: |
2733
set -e
2834
juno emulator start --headless &

.github/workflows/e2e-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
workflow_dispatch:
55
pull_request:
66
paths:
7+
- 'e2e'
8+
- 'package-lock.json'
79
- 'packages/auth/**'
810
- 'packages/core/**'
911
- 'packages/ic-client/**'
272 KB
Loading
257 KB
Loading
257 KB
Loading
160 KB
Loading
139 KB
Loading

e2e/page-objects/example.ii.page.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import {InternetIdentityPage} from '@dfinity/internet-identity-playwright';
2-
import {assertNonNullish} from '@dfinity/utils';
32
import type {AppPageParams} from './app.page';
43
import {ExamplePage} from './example.page';
54

65
export class ExampleInternetIdentityPage extends ExamplePage {
7-
#identity: number | undefined;
8-
96
#iiPage: InternetIdentityPage;
107

118
private constructor(params: AppPageParams) {
@@ -31,17 +28,18 @@ export class ExampleInternetIdentityPage extends ExamplePage {
3128
}
3229

3330
override async signUp(): Promise<void> {
34-
this.#identity = await this.#iiPage.signInWithNewIdentity({
35-
selector: this.locators.internet_identity.sign_in
31+
await this.#iiPage.signIn({
32+
passkey: {
33+
selector: this.locators.internet_identity.sign_in
34+
}
3635
});
3736
}
3837

3938
override async signIn(): Promise<void> {
40-
assertNonNullish(this.#identity);
41-
42-
await this.#iiPage.signInWithIdentity({
43-
identity: this.#identity,
44-
selector: this.locators.internet_identity.sign_in
39+
await this.#iiPage.signIn({
40+
passkey: {
41+
selector: this.locators.internet_identity.sign_in
42+
}
4543
});
4644
}
4745
}

package-lock.json

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
],
4545
"devDependencies": {
4646
"@dfinity/eslint-config-oisy-wallet": "^0.2.3",
47-
"@dfinity/internet-identity-playwright": "^2.0.0",
47+
"@dfinity/internet-identity-playwright": "^3.0.0-next-2026-02-02",
4848
"@icp-sdk/bindgen": "^0.2.1",
4949
"@playwright/test": "^1.58.2",
5050
"@size-limit/esbuild": "^11.2.0",

0 commit comments

Comments
 (0)