Skip to content

Commit 79c880e

Browse files
committed
Fixing some tests
1 parent 320e76d commit 79c880e

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

packages/tests-e2e/src/complete/models/corbado-auth-blocks/LoginInitBlockModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class LoginInitBlockModel {
1616
}
1717

1818
async fillEmailUsername(value: string) {
19-
const elem = this.page.getByRole('textbox', { name: /email/i });
19+
const elem = this.page.getByRole('textbox');
2020
await elem.click();
2121
await elem.fill(value);
2222
}

packages/tests-e2e/src/complete/utils/playground.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ export async function spawnPlaygroundNew(
6868
cwd: playgroundDir,
6969
env: {
7070
...process.env,
71-
VITE_CORBADO_PROJECT_ID_ManualTesting: projectId,
72-
NEXT_PUBLIC_CORBADO_PROJECT_ID_ManualTesting: projectId,
71+
NEXT_PUBLIC_CORBADO_PROJECT_ID: projectId,
7372
},
7473
stdio: 'ignore',
7574
shell: true,

playground/react/src/server/test-tools/oidc-db.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ export const OidcDb = {
7373
email,
7474
behavior: 'success',
7575
};
76-
getDb().prepare(
77-
`INSERT INTO mock_oidc_users (id, dev_session_id, email, behavior, created_at)
76+
getDb()
77+
.prepare(
78+
`INSERT INTO mock_oidc_users (id, dev_session_id, email, behavior, created_at)
7879
VALUES (?, ?, ?, ?, ?)`,
79-
).run(user.id, devSessionId, email, user.behavior, Date.now());
80+
)
81+
.run(user.id, devSessionId, email, user.behavior, Date.now());
8082
return user;
8183
},
8284

@@ -103,10 +105,12 @@ export const OidcDb = {
103105
},
104106

105107
storeAuthCode(code: string, userId: string, devSessionId: string) {
106-
getDb().prepare(
107-
`INSERT INTO mock_oidc_auth_codes (code, user_id, dev_session_id, created_at)
108+
getDb()
109+
.prepare(
110+
`INSERT INTO mock_oidc_auth_codes (code, user_id, dev_session_id, created_at)
108111
VALUES (?, ?, ?, ?)`,
109-
).run(code, userId, devSessionId, Date.now());
112+
)
113+
.run(code, userId, devSessionId, Date.now());
110114
},
111115

112116
getAuthCode(code: string): { code: string; userId: string; sessionId: string } | null {
@@ -133,10 +137,12 @@ export const OidcDb = {
133137
},
134138

135139
addSessionUser(devSessionId: string, userId: string) {
136-
getDb().prepare(
137-
`INSERT OR IGNORE INTO session_users (dev_session_id, user_id, created_at)
140+
getDb()
141+
.prepare(
142+
`INSERT OR IGNORE INTO session_users (dev_session_id, user_id, created_at)
138143
VALUES (?, ?, ?)`,
139-
).run(devSessionId, userId, Date.now());
144+
)
145+
.run(devSessionId, userId, Date.now());
140146
},
141147

142148
listSessionUsers(devSessionId: string): string[] {

0 commit comments

Comments
 (0)