Skip to content

[Chat] Wrap UI tests with themeProvider by default#4574

Merged
Leah-Xia-Microsoft merged 6 commits intomainfrom
leahxia/add-theme-provider-wrap-to-all-UI-test-components
May 3, 2024
Merged

[Chat] Wrap UI tests with themeProvider by default#4574
Leah-Xia-Microsoft merged 6 commits intomainfrom
leahxia/add-theme-provider-wrap-to-all-UI-test-components

Conversation

@Leah-Xia-Microsoft
Copy link
Copy Markdown
Member

@Leah-Xia-Microsoft Leah-Xia-Microsoft commented May 2, 2024

What

Before, we need to wrap up the UI components into FluentThemeProvider in each test. Now we move it into the beforeMount in the index.ts and have the flexibility to disable it by passing in a prop.

Ref:
Playwright related PR: microsoft/playwright#18616 (comment)
Playwright doc: https://playwright.dev/docs/test-components#hooks

Why

How Tested

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@Leah-Xia-Microsoft Leah-Xia-Microsoft requested review from a team as code owners May 2, 2024 23:53
@Leah-Xia-Microsoft Leah-Xia-Microsoft added does not need changelog Changes that does not affect the published package in any way do not need changelog entry update_snapshots Set this label to request automated update of UI snapshots labels May 2, 2024
@github-actions github-actions Bot removed the update_snapshots Set this label to request automated update of UI snapshots label May 2, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2024

Chat bundle size is not changed.

  • Current size: 2150877
  • Base size: 2150877
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2024

Calling bundle size is not changed.

  • Current size: 4888685
  • Base size: 4888685
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2024

CallWithChat bundle size is not changed.

  • Current size: 6283304
  • Base size: 6283304
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2024

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2024

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2024

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 25443 / 39377
64.61%
25443 / 39377
64.61%
699 / 1233
56.69%
2026 / 3210
63.11%
Current 25392 / 39377
64.48%
25392 / 39377
64.48%
699 / 1233
56.69%
2011 / 3197
62.9%
Diff -51 / 0
-0.13%
-51 / 0
-0.13%
0 / 0
0%
-15 / -13
-0.21%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2024

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 49880 / 79412
62.81%
49880 / 79412
62.81%
1038 / 2302
45.09%
2902 / 4779
60.72%
Current 49877 / 79412
62.8%
49877 / 79412
62.8%
1038 / 2302
45.09%
2891 / 4769
60.62%
Diff -3 / 0
-0.01%
-3 / 0
-0.01%
0 / 0
0%
-11 / -10
-0.1%

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.

What causes the size difference here?

image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What causes the size difference here?

image

I think it's because of adding a wrapper layer of the FluentThemeProvider, which might added some padding?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Also checked on the storybook implementation, there is this 1px ish purple area added with the wrapper
image

@Leah-Xia-Microsoft Leah-Xia-Microsoft enabled auto-merge (squash) May 3, 2024 20:53
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2024

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2024

@Leah-Xia-Microsoft Leah-Xia-Microsoft merged commit 6127695 into main May 3, 2024
@Leah-Xia-Microsoft Leah-Xia-Microsoft deleted the leahxia/add-theme-provider-wrap-to-all-UI-test-components branch May 3, 2024 21:27
@Leah-Xia-Microsoft Leah-Xia-Microsoft added the update_snapshots Set this label to request automated update of UI snapshots label May 3, 2024
@github-actions github-actions Bot removed the update_snapshots Set this label to request automated update of UI snapshots label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

does not need changelog Changes that does not affect the published package in any way do not need changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants