feat: routing form fields as variables in route#13519
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Ignored Deployments
|
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 75 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 02/02/2024 10:10:09pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 442fc67 Started: 02/02/2024 10:05:23pm UTC
|
|
|
13 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
unauthorized user sees correct translations (de) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.46% (-70)-70 / 246 runsfailed over last 7 days |
28.46% (70)70 / 246 runsflaked over last 7 days |
|
unauthorized user sees correct translations (ar) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.46% (-70)-70 / 246 runsfailed over last 7 days |
28.46% (70)70 / 246 runsflaked over last 7 days |
|
unauthorized user sees correct translations (zh) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.46% (-70)-70 / 246 runsfailed over last 7 days |
28.46% (70)70 / 246 runsflaked over last 7 days |
|
unauthorized user sees correct translations (zh-CN) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.46% (-70)-70 / 246 runsfailed over last 7 days |
28.46% (70)70 / 246 runsflaked over last 7 days |
|
unauthorized user sees correct translations (zh-TW) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.05% (-69)-69 / 246 runsfailed over last 7 days |
28.46% (70)70 / 246 runsflaked over last 7 days |
|
unauthorized user sees correct translations (pt) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.57% (-70)-70 / 245 runsfailed over last 7 days |
28.57% (70)70 / 245 runsflaked over last 7 days |
|
unauthorized user sees correct translations (pt-br) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.57% (-70)-70 / 245 runsfailed over last 7 days |
28.57% (70)70 / 245 runsflaked over last 7 days |
|
unauthorized user sees correct translations (es-419) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-28.57% (-70)-70 / 245 runsfailed over last 7 days |
28.57% (70)70 / 245 runsflaked over last 7 days |
|
authorized user sees correct translations (de) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-28.57% (-70)-70 / 245 runsfailed over last 7 days |
28.57% (70)70 / 245 runsflaked over last 7 days |
|
authorized user sees correct translations (pt-br) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-14.29% (-35)-35 / 245 runsfailed over last 7 days |
18.78% (46)46 / 245 runsflaked over last 7 days |
|
authorized user sees correct translations (ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-18.80% (-44)-44 / 234 runsfailed over last 7 days |
19.66% (46)46 / 234 runsflaked over last 7 days |
|
authorized user sees changed translations (de->ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-9.48% (-22)-22 / 232 runsfailed over last 7 days |
18.53% (43)43 / 232 runsflaked over last 7 days |
|
authorized user sees changed translations (de->pt-BR) [locale1] should return correct translations and html attributes
Retry 1 • Initial Attempt |
-9.48% (-20)-20 / 211 runsfailed over last 7 days |
18.96% (40)40 / 211 runsflaked over last 7 days |
📄 apps/web/playwright/login.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
user can login & logout succesfully -- future login flow user & logout using dashboard
Retry 1 • Initial Attempt |
4.51% (11)11 / 244 runsfailed over last 7 days |
42.21% (103)103 / 244 runsflaked over last 7 days |
📄 apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Stripe integration When event is paid and confirmed Payment should confirm pending payment booking
Retry 1 • Initial Attempt |
0% (0)0 / 246 runsfailed over last 7 days |
3.25% (8)8 / 246 runsflaked over last 7 days |
📄 apps/web/playwright/insights.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Insights should have all option in team-and-self filter as admin
Retry 1 • Initial Attempt |
0.39% (1)1 / 258 runfailed over last 7 days |
0.39% (1)1 / 258 runflaked over last 7 days |
| const regex = /\{([^\}]+)\}/g; | ||
|
|
||
| const variables: string[] = | ||
| decidedAction.value.match(regex)?.map((match: string) => match.slice(1, -1)) || []; | ||
|
|
||
| let eventTypeUrl = decidedAction.value; | ||
|
|
||
| variables.forEach((variable) => { | ||
| for (const key in response) { | ||
| const identifier = getFieldIdentifier(fields.find((field) => field.id === key)); | ||
| if (identifier === variable) { | ||
| eventTypeUrl = eventTypeUrl.replace( | ||
| `{${variable}}`, | ||
| slugify(response[key].value.toString() || "") | ||
| ); | ||
| } | ||
| } | ||
| }); | ||
| await router.push(`/${eventTypeUrl}?${allURLSearchParams}`); |
There was a problem hiding this comment.
We happened to change the same piece of code for 2 different reasons 😅
There was a problem hiding this comment.
yeah I saw that too 😅 we can merge yours first and I'll handle the conflicts
There was a problem hiding this comment.
Mine is not that urgent. Happy to merge it first. Could you extract out this logic in a separate function
There was a problem hiding this comment.
extracted it into a separate function, @hariombalhara can you re-review?
|
Looks like the perfect solution. We can add some improvements later like
|
…ges].tsx Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
What does this PR do?
Allows using a field identifier as a variable for event type redirects.
Loom: https://www.loom.com/share/2bd8b552028740fc9c4663e0cff08eb9
Type of change
How should this be tested?
Checklist