Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nmattia committed Jan 26, 2024
1 parent 7d3524c commit e527691
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions src/frontend/src/test-e2e/pinAuth.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Principal } from "@dfinity/principal";
import {
APPLE_USER_AGENT,
DEVICE_NAME1,
Expand Down Expand Up @@ -131,9 +130,7 @@ test("Log into client application using PIN registration flow", async () => {
const demoAppView = new DemoAppView(browser);
await demoAppView.open(TEST_APP_NICE_URL, II_URL);
await demoAppView.waitForDisplay();
expect(await demoAppView.getPrincipal()).toBe(
Principal.anonymous().toText()
);
expect(await demoAppView.getPrincipal()).toBe("");
await demoAppView.signin();
await switchToPopup(browser);
await FLOWS.registerPinNewIdentityAuthenticateView(pin, browser);
Expand All @@ -157,9 +154,7 @@ test("Register with PIN then log into client application", async () => {
const demoAppView = new DemoAppView(browser);
await demoAppView.open(TEST_APP_NICE_URL, II_URL);
await demoAppView.waitForDisplay();
expect(await demoAppView.getPrincipal()).toBe(
Principal.anonymous().toText()
);
expect(await demoAppView.getPrincipal()).toBe("");
await demoAppView.signin();

await switchToPopup(browser);
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/test-e2e/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ export class VcTestAppView extends View {
return false;
}

if (principal === Principal.anonymous().toText()) {
if (principal === "") {
return false;
}

Expand Down Expand Up @@ -802,7 +802,7 @@ export class DemoAppView extends View {
await waitToClose(this.browser);
// wait for the demo app to update the principal
await this.browser.waitUntil(
async () => (await this.getPrincipal()) !== Principal.anonymous().toText()
async () => (await this.getPrincipal()) !== ""
);
return this.getPrincipal();
}
Expand Down

0 comments on commit e527691

Please sign in to comment.