Skip to content

Commit b27884e

Browse files
BharathBharath
authored andcommitted
Based on playwright test included the specific import and also made few changes so that there is enough wait time to get the execution done.
1 parent a5119cd commit b27884e

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

e2e/auth.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ test.describe('Authentication', () => {
8181

8282
const signInPrompt = page.getByText(/sign in|login|connect.*google/i).or(
8383
page.getByRole('button', { name: /sign in|login/i })
84-
).first();
84+
);
8585

86-
// One of these should be present
87-
const hasSignInPrompt = await signInPrompt.isVisible().catch(() => false);
88-
const hasEmptyState = await page.getByText(/no credentials|get started/i).isVisible().catch(() => false);
86+
const emptyState = page.getByText(/no credentials|get started/i);
8987

90-
expect(hasSignInPrompt || hasEmptyState).toBeTruthy();
88+
// Wait for EITHER the sign-in prompt OR the empty state to be visible.
89+
// We use Playwright's auto-retrying expect to avoid race conditions with loading spinners.
90+
await expect(signInPrompt.or(emptyState).first()).toBeVisible({ timeout: 15000 });
9191
});
9292
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@cooperation/vc-storage": "^1.0.42",
17+
"@digitalbazaar/ed25519-signature-2020": "^5.4.0",
1718
"@digitalcredentials/ed25519-signature-2020": "^7.0.0",
1819
"@digitalcredentials/ed25519-verification-key-2020": "^5.0.0-beta.1",
1920
"@digitalcredentials/ezcap": "5.1.0",

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineConfig({
2121
/* Retry on CI only */
2222
retries: process.env.CI ? 2 : 0,
2323
/* Opt out of parallel tests on CI. */
24-
workers: process.env.CI ? 4 : undefined,
24+
workers: process.env.CI ? 6 : undefined,
2525
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
2626
reporter: 'html',
2727
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */

0 commit comments

Comments
 (0)