Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: testing workflow triggers #12823

Merged
merged 22 commits into from
Dec 21, 2023
Merged

test: testing workflow triggers #12823

merged 22 commits into from
Dec 21, 2023

Conversation

CarinaWolli
Copy link
Member

@CarinaWolli CarinaWolli commented Dec 15, 2023

What does this PR do?

Add tests for testing workflow triggers when new booking is created and booking is rescheduled.

Follow up issues:
#12882
#12881

Type of change

  • Tests (Unit/Integration/E2E or any other test)

How should this be tested?

Run:

  • yarn test fresh-booking.test.ts
  • yarn test reschedule.test.ts

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Copy link

vercel bot commented Dec 15, 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 Dec 20, 2023 6:32pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2023 6:32pm
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2023 6:32pm
cal ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2023 6:32pm
cal-demo ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2023 6:32pm
qa ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2023 6:32pm
ui ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2023 6:32pm

Copy link
Contributor

github-actions bot commented Dec 15, 2023

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

Copy link
Contributor

github-actions bot commented Dec 15, 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! 🙌

Copy link

deploysentinel bot commented Dec 16, 2023

Current Playwright Test Results Summary

✅ 334 Passing - ❌ 1 Failing - ⚠️ 19 Flaky

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

(Last updated on 12/18/2023 03:26:42pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 0efc646

Started: 12/18/2023 03:17:26pm UTC

❌ Failures

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 2Retry 1Initial Attempt
Error: Timed out 30000ms waiting for expect(received).toBeVisible()...
Timed out 30000ms waiting for expect(received).toBeVisible()
Call log:
  - expect.toBeVisible with timeout 30000ms
  - waiting for locator('[data-testid=success-page]')
  - waiting for locator('[data-testid=success-page]')

13.97% (38) 38 / 272 runs
failed over last 7 days
80.15% (218) 218 / 272 runs
flaked over last 7 days

⚠️ Flakes

📄   apps/web/playwright/team/team-invitation.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
Team Invitation (non verified)
Retry 1Initial Attempt
4.12% (11) 11 / 267 runs
failed over last 7 days
93.26% (249) 249 / 267 runs
flaked over last 7 days
Team Invitation (verified)
Retry 1Initial Attempt
0% (0) 0 / 267 runs
failed over last 7 days
94.76% (253) 253 / 267 runs
flaked over last 7 days

📄   apps/web/playwright/locale.e2e.ts • 13 Flakes

Top 1 Common Error Messages

null

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 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
unauthorized user sees correct translations (ar) should use correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
unauthorized user sees correct translations (zh) should use correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
unauthorized user sees correct translations (zh-CN) should use correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
unauthorized user sees correct translations (zh-TW) should use correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
unauthorized user sees correct translations (pt) should use correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
unauthorized user sees correct translations (pt-br) should use correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
unauthorized user sees correct translations (es-419) should use correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
authorized user sees correct translations (de) should return correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
authorized user sees correct translations (pt-br) should return correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
authorized user sees correct translations (ar) should return correct translations and html attributes
Retry 1Initial Attempt
-12.64% (-34) -34 / 269 runs
failed over last 7 days
12.64% (34) 34 / 269 runs
flaked over last 7 days
authorized user sees changed translations (de->ar) should return correct translations and html attributes
Retry 1Initial Attempt
-2.97% (-8) -8 / 269 runs
failed over last 7 days
11.52% (31) 31 / 269 runs
flaked over last 7 days
authorized user sees changed translations (de->pt-BR) [locale1] should return correct translations and html attributes
Retry 1Initial Attempt
-8.54% (-21) -21 / 246 runs
failed over last 7 days
11.79% (29) 29 / 246 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests user -- legacy Different Locations Tests can add single organizer address location without display location public option
Retry 1Initial Attempt
0% (0) 0 / 245 runs
failed over last 7 days
1.22% (3) 3 / 245 runs
flaked over last 7 days

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

Top 1 Common Error Messages

null

3 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
1.10% (3) 3 / 272 runs
failed over last 7 days
61.03% (166) 166 / 272 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1Initial Attempt
0.37% (1) 1 / 272 run
failed over last 7 days
83.82% (228) 228 / 272 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
0.37% (1) 1 / 272 run
failed over last 7 days
50.37% (137) 137 / 272 runs
flaked over last 7 days

View Detailed Build Results


emails: Fixtures["emails"];
organizer: { email: string; name: string; timeZone: string };
}) {
const subjectPattern = /^Reminder: /i;
Copy link
Member Author

Choose a reason for hiding this comment

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

For now I am only testing workflows with reminder template, so subject will always start with 'Reminder: '

@@ -1374,7 +1439,7 @@ describe("handleNewBooking", () => {
status: BookingStatus.PENDING,
});

expectWorkflowToBeTriggered();
expectWorkflowToBeNotTriggered({ organizer, emails });
Copy link
Member Author

Choose a reason for hiding this comment

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

status is pending because event type requires confirmation, workflow is triggered when booking is confirmed

@@ -202,7 +202,7 @@ describe("handleNewBooking", () => {
});
}

expectWorkflowToBeTriggered();
// expectWorkflowToBeTriggered();
Copy link
Member Author

Choose a reason for hiding this comment

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

Will do this in a follow-up: #12882

@@ -815,7 +850,7 @@ describe("handleNewBooking", () => {
},
});

expectWorkflowToBeTriggered();
// expectWorkflowToBeTriggered({emails, organizer});
Copy link
Member Author

Choose a reason for hiding this comment

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

this fails and is a bug, I created an issue for it: #12881

@@ -198,7 +198,7 @@ describe("handleNewBooking", () => {
],
});

expectWorkflowToBeTriggered();
// expectWorkflowToBeTriggered();
Copy link
Member Author

Choose a reason for hiding this comment

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

also follow up: #12882


const testMode = process.env.NEXT_PUBLIC_IS_E2E || process.env.INTEGRATION_TEST_MODE ? true : false;
if (testMode) {
if (!mailData.sendAt) {
Copy link
Member Author

Choose a reason for hiding this comment

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

for now only 'when event is booked' trigger is tested, no scheduling of email in test mode possible and needed for now

@@ -327,6 +327,7 @@
"TELEMETRY_DEBUG",
"TWILIO_MESSAGING_SID",
"TWILIO_PHONE_NUMBER",
"TWILIO_WHATSAPP_PHONE_NUMBER",
Copy link
Member Author

Choose a reason for hiding this comment

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

this was missing, couldn't commit without that. Not sure why this was no issue before

@CarinaWolli CarinaWolli marked this pull request as ready for review December 20, 2023 18:11
@Udit-takkar Udit-takkar merged commit 076868d into main Dec 21, 2023
24 checks passed
@Udit-takkar Udit-takkar deleted the tests/workflows branch December 21, 2023 13:27
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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants