Skip to content

test: Create unit tests for react components is packages/ui/components/navigation#10698

Merged
hariombalhara merged 6 commits intomainfrom
test-navigation
Aug 24, 2023
Merged

test: Create unit tests for react components is packages/ui/components/navigation#10698
hariombalhara merged 6 commits intomainfrom
test-navigation

Conversation

@gitstart-calcom
Copy link
Copy Markdown
Contributor

@gitstart-calcom gitstart-calcom commented Aug 10, 2023

Testing

yarn test navigation

image

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 10, 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 Aug 23, 2023 1:45pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2023 1:45pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2023 1:45pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2023 1:45pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Aug 23, 2023 1:45pm
qa ⬜️ Ignored (Inspect) Visit Preview Aug 23, 2023 1:45pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 10, 2023

Thank you for following the naming conventions! 🙏

@zomars zomars added the core area: core, team members only label Aug 10, 2023
@gitstart-calcom gitstart-calcom marked this pull request as ready for review August 10, 2023 13:41
@gitstart-calcom gitstart-calcom changed the title test: Creat unit tests for react components is packages/ui/components/navigation test: Create unit tests for react components is packages/ui/components/navigation Aug 10, 2023
@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous bot commented Aug 10, 2023

🤖 Meticulous spotted visual differences in 47 of 123 screens tested: view and approve differences detected.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 10, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Seven Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/settings/my-account/profile 373.19 KB 527.95 KB 150.84% (🟡 +0.22%)
/settings/organizations/general 329.44 KB 484.2 KB 138.34% (🟡 +0.17%)
/settings/organizations/profile 370.53 KB 525.29 KB 150.08% (🟡 +0.19%)
/settings/organizations/teams/other/[id]/members 253.2 KB 407.96 KB 116.56% (🟡 +0.20%)
/settings/organizations/teams/other/[id]/profile 440.04 KB 594.79 KB 169.94% (🟡 +0.16%)
/settings/security/password 261.63 KB 416.38 KB 118.97% (🟡 +0.18%)
/settings/teams/[id]/profile 440.42 KB 595.18 KB 170.05% (🟡 +0.16%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@deploysentinel
Copy link
Copy Markdown

deploysentinel bot commented Aug 10, 2023

Current Playwright Test Results Summary

✅ 120 Passing - ⚠️ 1 Flaky

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

(Last updated on 08/23/2023 01:48:27pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: b124501

Started: 08/23/2023 01:46:59pm UTC

⚠️ Flakes

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
2.79% (7) 7 / 251 runs
failed over last 7 days
96.81% (243) 243 / 251 runs
flaked over last 7 days

View Detailed Build Results


expect(name).toBeInTheDocument();
expect(tabLabelElement).toHaveAttribute("href", tab.href);

const spanSibling = name.querySelector("span");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

span seems to be implementation detail. User doesn't see a span, he would see the content in it.
We should check what that span shows to user.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @hariombalhara That span tag doesn't have any content, please take a look here:
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@gitstart-calcom Then why are we checking for span tag. What I meant was that we should test for what a user sees. If he can't see the span(it has no content), then why are we testing its presence

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, we have updated the test now

Copy link
Copy Markdown
Member

@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.

Thanks @gitstart-calcom. Left some comments.

@PeerRich PeerRich added the Low priority Created by Linear-GitHub Sync label Aug 14, 2023
@gitstart-calcom
Copy link
Copy Markdown
Contributor Author

Hi @hariombalhara we made the requested changes, please take a look 😄

Copy link
Copy Markdown
Member

@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.

Left a reply.

@hariombalhara hariombalhara merged commit e3c747a into main Aug 24, 2023
@hariombalhara hariombalhara deleted the test-navigation branch August 24, 2023 07:53
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 Low priority Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants