Skip to content
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
6 changes: 3 additions & 3 deletions src/e2e/page-objects/console.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export class ConsolePage extends IdentityPage {
await this.page.goto('/');
}

async signIn(): Promise<void> {
this.identity = await this.#consoleIIPage.signInWithNewIdentity({
selector: `[data-tid=${testIds.auth.signIn}]`
async signInWithII(): Promise<void> {
this.iiAnchor = await this.#consoleIIPage.signInWithNewIdentity({
selector: `[data-tid=${testIds.auth.signInII}]`
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/e2e/page-objects/identity.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface IdentityPageParams {
}

export abstract class IdentityPage {
protected identity: number | undefined;
protected iiAnchor: number | undefined;

protected readonly page: Page;
protected readonly context: BrowserContext;
Expand Down
2 changes: 1 addition & 1 deletion src/e2e/utils/init.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const initTestSuite = (): (() => ConsolePage) => {

await consolePage.goto();

await consolePage.signIn();
await consolePage.signInWithII();
});

testWithII.afterAll(async () => {
Expand Down
4 changes: 1 addition & 3 deletions src/frontend/src/lib/components/sign-in/SignInGoogle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
import { nonNullish } from '@dfinity/utils';
import IconGoogle from '$lib/components/icons/IconGoogle.svelte';
import { GOOGLE_CLIENT_ID } from '$lib/constants/app.constants';
import { testIds } from '$lib/constants/test-ids.constants';
import { signInWithGoogle } from '$lib/services/auth/auth.openid.services';
import { isBusy } from '$lib/stores/busy.store';
import { i18n } from '$lib/stores/i18n.store';
import { testId } from '$lib/utils/test.utils';
</script>

{#if nonNullish(GOOGLE_CLIENT_ID)}
<button {...testId(testIds.auth.signIn)} disabled={$isBusy} onclick={signInWithGoogle}
<button disabled={$isBusy} onclick={signInWithGoogle}
><IconGoogle size="20px" />
<span>{$i18n.sign_in.google}</span></button
>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/lib/components/sign-in/SignInII.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</script>

<button
{...testId(testIds.auth.signIn)}
{...testId(testIds.auth.signInII)}
aria-label={$i18n.sign_in.internet_identity}
disabled={$isBusy}
onclick={signInWithII}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/lib/constants/test-ids.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { TestIds } from '$lib/types/test-id';

export const testIds = {
auth: {
signIn: 'btn-sign-in'
signInII: 'btn-sign-in-ii'
},
createSatellite: {
launch: 'btn-launch-satellite',
Expand Down