cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

E2E: Two Factor Auth

Open hariombalhara opened this issue 1 year ago • 5 comments

What does this PR do?

Add tests to verify that 2FA can be enabled and disabled. If enabled, user should be able to login with it. Closes #9140

Demo

https://www.loom.com/share/4f86d6b5fca041a9a69850dbdb6ffba2

Type of change

  • E2E tests

hariombalhara avatar May 26 '23 10:05 hariombalhara

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2023 2:03pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api ⬜️ Ignored (Inspect) Visit Preview May 30, 2023 2:03pm
ui ⬜️ Ignored (Inspect) Visit Preview May 30, 2023 2:03pm

vercel[bot] avatar May 26 '23 10:05 vercel[bot]

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

github-actions[bot] avatar May 26 '23 10:05 github-actions[bot]

Current Playwright Test Results Summary

✅ 104 Passing - ⚠️ 2 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 05/30/2023 02:20:22pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: f5a5d55bd58be7580046d661192da3757204c9d4

Started: 05/30/2023 02:16:29pm UTC

⚠️ Flakes

📄   apps/web/playwright/managed-event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Managed Event Types tests Can create managed event type
Retry 1Initial Attempt
1.43% (5) 5 / 350 runs
failed over last 7 days
20% (70) 70 / 350 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
3.05% (4) 4 / 131 runs
failed over last 7 days
61.83% (81) 81 / 131 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar May 26 '23 11:05 deploysentinel[bot]

@hariombalhara i'm getting this even in headless mode imagen

roae avatar May 26 '23 21:05 roae

Screenshot 2023-05-27 at 9 33 36 AM Tests work me locally and on CI. The screenshot is of CI. Can you debug after setting PWDEBUG=1 and let me know what's on the screen when it's waiting for data-testid="two-factor-switch" ?

Also, remember to pass CALENDSO_ENCRYPTION_KEY env variable same as the one from .env because I have sometimes seen that the env variable isn't present during tests(maybe my setup is like this)

I Use the following command. PWDEBUG=1 CALENDSO_ENCRYPTION_KEY='CALENDSO_ENCRYPTION_KEY' yarn e2e

hariombalhara avatar May 27 '23 04:05 hariombalhara