Skip to content

fix: Password reset tests & better expiry checking#10102

Merged
zomars merged 2 commits intomainfrom
chore/improve-password-reset
Jul 12, 2023
Merged

fix: Password reset tests & better expiry checking#10102
zomars merged 2 commits intomainfrom
chore/improve-password-reset

Conversation

@emrysal
Copy link
Copy Markdown
Contributor

@emrysal emrysal commented Jul 12, 2023

What does this PR do?

  • By using Prisma instead of using NEXT_PUBLIC_IS_E2E we both improve the test and reduce differences between test & production.
  • The API endpoint had no check on whether the password reset was expired, which is a low risk vulnerability.
  • Added an extra check in the tests to confirm a used password reset cannot be re-used.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 12, 2023

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

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 5:07pm
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 5:07pm
cal-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 5:07pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview Jul 12, 2023 5:07pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 12, 2023

Thank you for following the naming conventions! 🙏

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 12, 2023

🤖 Meticulous spotted visual differences in 70 of 155 screens tested: view and approve differences detected.

Last updated for commit c9878df. This comment will update as new commits are pushed.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 12, 2023

📦 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! 🙌

@emrysal emrysal requested review from a team and keithwillcode July 12, 2023 16:17
@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Jul 12, 2023

Current Playwright Test Results Summary

✅ 88 Passing - ⚠️ 3 Flaky

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

(Last updated on 07/12/2023 05:10:47pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: c9878df

Started: 07/12/2023 05:07:56pm UTC

⚠️ Flakes

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1Initial Attempt
2.78% (1) 1 / 36 run
failed over last 7 days
13.89% (5) 5 / 36 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
2.78% (1) 1 / 36 run
failed over last 7 days
97.22% (35) 35 / 36 runs
flaked over last 7 days

📄   apps/web/playwright/embed-code-generator.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Embed Code Generator Tests Event Types Page open Embed Dialog and choose element-click for First Event Type
Retry 1Initial Attempt
0% (0) 0 / 315 runs
failed over last 7 days
5.71% (18) 18 / 315 runs
flaked over last 7 days

View Detailed Build Results


@emrysal emrysal marked this pull request as ready for review July 12, 2023 16:34
@emrysal emrysal changed the title fix: Modified tests & better expiry checking fix: Password reset tests & better expiry checking Jul 12, 2023
});

/** So we can test the password reset flow on CI */
if (process.env.NEXT_PUBLIC_IS_E2E) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice workaround 🙏🏽

@zomars zomars merged commit 7b57b4b into main Jul 12, 2023
@zomars zomars deleted the chore/improve-password-reset branch July 12, 2023 17:27
fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants