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

Zoom/Hubspot Tests with MSW mocking of requests initiated from Next.js server

Open hariombalhara opened this issue 3 years ago • 2 comments

Self Review is pending

Fixes https://github.com/calcom/cal.com/issues/3177 https://github.com/calcom/cal.com/issues/2255

Tests that verify

  • Zoom
    • Installation/Uninstallation.
    • Add zoom to an event-type and ensures that Zoom meeting is created
    • 2 Emails are sent with zoom links
  • Hubspot
    • Installation/Uninstallation

Approach

Tests with MSW require that playwright workers launch their own Next.js instance, so that within the tests we can mock requests based on the testcase

Known Limitations -

  • More than 1 workers don't currently work because our codebase doesn't support building once and then running with different ports. We need to use the port of the app itself when it was launched.
  • Due to the above limitation I am running these tests in separate workflow.yml so that they don't slow down other tests.

hariombalhara avatar Jul 01 '22 12:07 hariombalhara

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

Name Status Preview Updated
cal ❌ Failed (Inspect) Aug 26, 2022 at 6:20PM (UTC)
cal-com ❌ Failed (Inspect) Aug 26, 2022 at 6:20PM (UTC)
nightly-cal ❌ Failed (Inspect) Aug 26, 2022 at 6:20PM (UTC)
3 Ignored Deployments
Name Status Preview Updated
docs ⬜️ Ignored (Inspect) Aug 26, 2022 at 6:20PM (UTC)
swagger ⬜️ Ignored (Inspect) Aug 26, 2022 at 6:20PM (UTC)
ui ⬜️ Ignored (Inspect) Aug 26, 2022 at 6:20PM (UTC)

vercel[bot] avatar Jul 01 '22 12:07 vercel[bot]

Socket Security Report

Dependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again.

📜 New install scripts detected

A dependency change in this PR is introducing new install scripts to your install step.

Package Script field Location
[email protected] (added) postinstall apps/web/package.json
Socket.dev scan summary
Issue Status
Did you mean? ✅ no new possible package typos
Install scripts ⚠️ 1 new install script detected
Telemetry ✅ no new telemetry
Troll package ✅ no new troll packages
Malware ✅ no new malware
Native code ✅ no new native modules

Powered by socket.dev

socket-security[bot] avatar Jul 01 '22 12:07 socket-security[bot]

Solved conflitcts and updated this PR @hariombalhara do you think this is mergable?

zomars avatar Aug 12 '22 01:08 zomars

@zomars yeah. I had forgotten to remove "Self review Pending" from description

hariombalhara avatar Aug 12 '22 01:08 hariombalhara

are these only tests? should be safe to merge then. just noticed some merge conflicts @hariombalhara

PeerRich avatar Aug 18 '22 19:08 PeerRich

Yeah these are just tests. Will resolve the conflicts.

hariombalhara avatar Aug 19 '22 02:08 hariombalhara

Conflicts resolved.

hariombalhara avatar Aug 19 '22 03:08 hariombalhara

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

kodiakhq[bot] avatar Aug 22 '22 23:08 kodiakhq[bot]

@zomars @zlwaterfield Please review this. Should be quick one as it affects only tests and they are passing.

hariombalhara avatar Aug 26 '22 04:08 hariombalhara