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: Add more orgs tests #12241

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Nov 6, 2023

What does this PR do?

Adds tests to verify

  • Org creation and onboarding
  • Org member invitation

Based on @leog's work in #11804 as I didn't have write access to the PR. I did some small fixes and code cleanup.

How should this be tested?

yarn e2e organization

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 Nov 6, 2023

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

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2023 8:03am
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2023 8:03am
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2023 8:03am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Nov 15, 2023 8:03am
cal-demo ⬜️ Ignored (Inspect) Visit Preview Nov 15, 2023 8:03am
qa ⬜️ Ignored (Inspect) Visit Preview Nov 15, 2023 8:03am
ui ⬜️ Ignored (Inspect) Visit Preview Nov 15, 2023 8:03am

Copy link
Contributor

github-actions bot commented Nov 6, 2023

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

@zomars zomars added the core area: core, team members only label Nov 6, 2023
@@ -143,7 +143,7 @@ export default function Signup({ prepopulateFormValues, token, orgSlug, orgAutoA
methods.clearErrors("apiError");
}

if (methods.getValues().username === undefined && isOrgInviteByLink && orgAutoAcceptEmail) {
if (!methods.getValues().username && isOrgInviteByLink && orgAutoAcceptEmail) {
Copy link
Member Author

@hariombalhara hariombalhara Nov 6, 2023

Choose a reason for hiding this comment

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

empty username isn't valid so, let's compute username from email in that case as well.

Copy link

socket-security bot commented Nov 6, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@types/jsdom 21.1.5 None +1 35.4 kB types

@@ -37,7 +37,7 @@ type SignupProps = inferSSRProps<typeof getServerSideProps>;
const checkValidEmail = (email: string) => z.string().email().safeParse(email).success;

const getOrgUsernameFromEmail = (email: string, autoAcceptEmailDomain: string) => {
const [emailUser, emailDomain] = email.split("@");
const [emailUser, emailDomain = ""] = email.split("@");
Copy link
Member Author

Choose a reason for hiding this comment

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

The issue arises when form is submitted without entering the email or email doesn't have @ in it when it was submitted.

Copy link
Contributor

github-actions bot commented Nov 6, 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 Nov 6, 2023

Current Playwright Test Results Summary

✅ 318 Passing - ⚠️ 8 Flaky

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

(Last updated on 11/15/2023 08:07:03am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 7943f83

Started: 11/15/2023 07:59:06am UTC

⚠️ Flakes

📄   apps/web/playwright/login.2fa.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
2FA Tests should allow a user to enable 2FA and login using 2FA
Retry 1Initial Attempt
0.39% (1) 1 / 258 run
failed over last 7 days
32.56% (84) 84 / 258 runs
flaked over last 7 days

📄   apps/web/playwright/booking/phoneQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Phone Question and Each Other Question Booking With Phone Question and Address Question Booking With Phone Question and multiselect Question Phone required and multiselect text not required
Retry 1Initial Attempt
1.21% (3) 3 / 248 runs
failed over last 7 days
0.81% (2) 2 / 248 runs
flaked over last 7 days

📄   apps/web/playwright/booking/addressQuestione2e/addressQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Address Question and Each Other Question Booking With Address Question and multiselect Question Address required and multiselect text required
Retry 1Initial Attempt
0% (0) 0 / 259 runs
failed over last 7 days
1.54% (4) 4 / 259 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 Different Locations Tests Can add Link Meeting as location and book with it
Retry 1Initial Attempt
0.75% (2) 2 / 266 runs
failed over last 7 days
6.77% (18) 18 / 266 runs
flaked over last 7 days

📄   apps/web/playwright/organization/organization-creation.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Organization should be able to create an organization and complete onboarding
Retry 2Retry 1Initial Attempt
0% (0) 0 / 3 runs
failed over last 7 days
100% (3) 3 / 3 runs
flaked over last 7 days

📄   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 be able to reschedule
Retry 2Retry 1Initial Attempt
16.97% (47) 47 / 277 runs
failed over last 7 days
79.06% (219) 219 / 277 runs
flaked over last 7 days
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1Initial Attempt
1.08% (3) 3 / 278 runs
failed over last 7 days
55.76% (155) 155 / 278 runs
flaked over last 7 days

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
FORM_SUBMITTED on submitting team form, triggers team webhook
Retry 1Initial Attempt
1.12% (3) 3 / 269 runs
failed over last 7 days
13.38% (36) 36 / 269 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Member Author

@hariombalhara hariombalhara left a comment

Choose a reason for hiding this comment

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

Self reviewed

@@ -175,7 +170,6 @@ export const createHandler = async ({ input, ctx }: CreateOptions) => {

return { user: { ...createOwnerOrg, password } };
} else {
if (!IS_PRODUCTION) return { checked: true };
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's needed. Code verification still accepts any code for dev mode, so there is no need to skip sending email

@hariombalhara hariombalhara requested a review from a team November 13, 2023 13:21
@hariombalhara
Copy link
Member Author

hariombalhara commented Nov 15, 2023

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

Copy link
Contributor

@keithwillcode keithwillcode left a comment

Choose a reason for hiding this comment

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

Amazing work on these tests, @hariombalhara

@keithwillcode keithwillcode merged commit 48dde24 into main Nov 21, 2023
37 checks passed
@keithwillcode keithwillcode deleted the chore/orgs-creation-invitation-e2e branch November 21, 2023 17:03
ShubhamPalriwala pushed a commit to ShubhamPalriwala/cal.com that referenced this pull request Nov 22, 2023
ShubhamPalriwala pushed a commit to ShubhamPalriwala/cal.com that referenced this pull request Nov 22, 2023
zomars pushed a commit that referenced this pull request Nov 22, 2023
@zomars zomars mentioned this pull request Nov 28, 2023
3 tasks
hbjORbj pushed a commit to codemod-com/cal.com-demo that referenced this pull request Nov 28, 2023
jakazzy pushed a commit to jakazzy/cal.com that referenced this pull request Dec 5, 2023
hbjORbj pushed a commit to codemod-com/cal.com-demo that referenced this pull request Dec 21, 2023
PeerRich added a commit that referenced this pull request Jan 2, 2024
* feat: integrate formbricks in help feedback box

* Update yarn.lock

* Update yarn.lock

* fix: use formbricks/[email protected] & set user with userId linked to feedback

* fix: use separate env vars as suggested

* test: Add more orgs tests (#12241)

* feat: integrate formbricks in help feedback box

* Update yarn.lock

* fix: yarn lockfile

* fix: yarn lockfile again

* feat: link cal and formbricks user.id and add attributes of email and username to formbricks person object

* Update yarn.lock

* Update yarn.lock

* fix: type safety in enums

---------

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests area: unit tests, e2e tests, playwright core area: core, team members only Medium priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants