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

feat(a11y-testing): add package #14797

Closed
wants to merge 10 commits into from

Conversation

mnajdova
Copy link
Contributor

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ yarn change

Description of changes

(give an overview)

Focus areas to test

(optional)

BehaviorRule.root()
.forProps({ checked: undefined, defaultChecked: true })
.afterEvent(
'onClick',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"onClick" as name of the handler is actually required only for the hooks tests. If we decide to go with only components test, this can safely be removed, as in the ComponentTestFacade we are just dispatching the event which is currently second argument.

@@ -0,0 +1,8 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't commit the merge changes if I didn't replace tslint.json with .eslint.json 😕

.doesNotHaveAttribute('aria-pressed')
.description('by default'),
BehaviorRule.root()
.afterEvent(
Copy link
Contributor

Choose a reason for hiding this comment

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

could you also add afterClick(), so that we do not have to create the mouse event in every test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah that makes sense, it can be extended later for other handlers we may add 👍

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Aug 28, 2020

Perf Analysis

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 867 839 5000
ButtonNext mount 581 541 5000
Checkbox mount 1488 1514 5000
CheckboxBase mount 1272 1298 5000
CheckboxNext mount 1623 1632 5000
ChoiceGroup mount 4802 4761 5000
ChoiceGroupNext mount 4777 4848 5000
ComboBox mount 890 952 1000
CommandBar mount 7400 7474 1000
ContextualMenu mount 13404 13329 1000
DefaultButton mount 1066 1080 5000
DetailsRow mount 3437 3417 5000
DetailsRowFast mount 3475 3460 5000
DetailsRowNoStyles mount 3279 3207 5000
Dialog mount 1469 1446 1000
DocumentCardTitle mount 1811 1825 1000
Dropdown mount 2503 2513 5000
FocusZone mount 1714 1829 5000
IconButton mount 1655 1846 5000
Label mount 342 333 5000
Link mount 454 444 5000
LinkNext mount 467 460 5000
MenuButton mount 1411 1373 5000
MessageBar mount 2085 2075 5000
MessageBarNext mount 2042 2069 5000
Nav mount 3117 3069 1000
OverflowSet mount 1338 1369 5000
OverflowSetNext mount 999 991 5000
Panel mount 1414 1408 1000
Persona mount 806 805 1000
Pivot mount 1360 1394 1000
PivotNext mount 1361 1366 1000
PrimaryButton mount 1275 1247 5000
SearchBox mount 1284 1295 5000
SearchBoxNext mount 1289 1246 5000
Shimmer mount 2535 2510 5000
ShimmerNext mount 2480 2421 5000
Slider mount 1478 1437 5000
SliderNext mount 1870 1865 5000
SpinButton mount 4794 4856 5000
SpinButtonNext mount 4900 4972 5000
Spinner mount 415 392 5000
SplitButton mount 3023 3049 5000
Stack mount 495 518 5000
StackWithIntrinsicChildren mount 1857 1864 5000
StackWithTextChildren mount 4885 4733 5000
TagPicker mount 2674 2686 5000
TeachingBubble mount 49579 49891 5000
TeachingBubbleNext mount 51133 50404 5000
Text mount 427 413 5000
TextField mount 1313 1347 5000
ThemeProvider mount 4117 4096 5000
ThemeProvider virtual-rerender 451 459 5000
Toggle mount 806 820 5000
ToggleNext mount 830 807 5000
button mount 115 110 5000

Perf Analysis (Fluent)

⚠️ 4 potential perf regressions detected

Potential regressions comparing to master

Scenario Current PR Ticks Baseline Ticks Ratio Regression Analysis
ButtonOverridesMissPerf.default 108 45 2.4:1 analysis
ButtonUseCssPerf.default 47 43 1.09:1 analysis
ListCommonPerf.default 656 914 0.72:1 analysis
ListNestedPerf.default 562 838 0.67:1 analysis
Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🎯 Avatar.Fluent 0.41 0.46 0.89:1 2000 828
🦄 Button.Fluent 0.1 0.18 0.56:1 5000 521
🔧 Checkbox.Fluent 0.62 0.33 1.88:1 1000 616
🎯 Dialog.Fluent 0.15 0.21 0.71:1 5000 760
🔧 Dropdown.Fluent 2.87 0.46 6.24:1 1000 2869
🔧 Icon.Fluent 0.14 0.05 2.8:1 5000 704
🎯 Image.Fluent 0.07 0.1 0.7:1 5000 364
🔧 Slider.Fluent 1.57 0.35 4.49:1 1000 1574
🔧 Text.Fluent 0.06 0.02 3:1 5000 316
🦄 Tooltip.Fluent 0.11 17 0.01:1 5000 542

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ButtonUseCssNestingPerf.default 54 44 1.23:1
PortalMinimalPerf.default 138 117 1.18:1
AttachmentMinimalPerf.default 160 142 1.13:1
HeaderMinimalPerf.default 362 319 1.13:1
AlertMinimalPerf.default 295 268 1.1:1
Icon.Fluent 704 643 1.09:1
AccordionMinimalPerf.default 154 142 1.08:1
LabelMinimalPerf.default 397 366 1.08:1
ButtonSlotsPerf.default 579 543 1.07:1
DividerMinimalPerf.default 355 333 1.07:1
ImageMinimalPerf.default 357 335 1.07:1
MenuMinimalPerf.default 832 780 1.07:1
TextMinimalPerf.default 337 315 1.07:1
Dialog.Fluent 760 713 1.07:1
FlexMinimalPerf.default 278 263 1.06:1
ProviderMergeThemesPerf.default 2021 1915 1.06:1
CardMinimalPerf.default 536 511 1.05:1
LayoutMinimalPerf.default 376 359 1.05:1
ProviderMinimalPerf.default 942 895 1.05:1
ReactionMinimalPerf.default 371 355 1.05:1
RefMinimalPerf.default 211 201 1.05:1
SkeletonMinimalPerf.default 386 367 1.05:1
TooltipMinimalPerf.default 772 738 1.05:1
BoxMinimalPerf.default 331 318 1.04:1
ChatDuplicateMessagesPerf.default 413 398 1.04:1
ChatMinimalPerf.default 598 577 1.04:1
DropdownManyItemsPerf.default 740 714 1.04:1
MenuButtonMinimalPerf.default 1515 1454 1.04:1
TreeWith60ListItems.default 208 200 1.04:1
AnimationMinimalPerf.default 383 371 1.03:1
AvatarMinimalPerf.default 454 439 1.03:1
CarouselMinimalPerf.default 447 433 1.03:1
ChatWithPopoverPerf.default 465 451 1.03:1
EmbedMinimalPerf.default 1866 1804 1.03:1
FormMinimalPerf.default 385 374 1.03:1
ItemLayoutMinimalPerf.default 1215 1179 1.03:1
ListMinimalPerf.default 461 447 1.03:1
LoaderMinimalPerf.default 737 715 1.03:1
SliderMinimalPerf.default 1577 1528 1.03:1
TextAreaMinimalPerf.default 445 432 1.03:1
Button.Fluent 521 507 1.03:1
Image.Fluent 364 355 1.03:1
Tooltip.Fluent 542 525 1.03:1
PopupMinimalPerf.default 654 642 1.02:1
CustomToolbarPrototype.default 3749 3684 1.02:1
ToolbarMinimalPerf.default 894 879 1.02:1
VideoMinimalPerf.default 604 592 1.02:1
AttachmentSlotsPerf.default 1115 1102 1.01:1
CheckboxMinimalPerf.default 2760 2735 1.01:1
HeaderSlotsPerf.default 752 742 1.01:1
RadioGroupMinimalPerf.default 392 390 1.01:1
SegmentMinimalPerf.default 333 329 1.01:1
SplitButtonMinimalPerf.default 3678 3645 1.01:1
TreeMinimalPerf.default 832 820 1.01:1
Checkbox.Fluent 616 607 1.01:1
Dropdown.Fluent 2869 2853 1.01:1
Slider.Fluent 1574 1563 1.01:1
DialogMinimalPerf.default 741 739 1:1
DropdownMinimalPerf.default 2910 2903 1:1
IconMinimalPerf.default 644 646 1:1
TableManyItemsPerf.default 2117 2109 1:1
Text.Fluent 316 315 1:1
InputMinimalPerf.default 1284 1291 0.99:1
TableMinimalPerf.default 385 389 0.99:1
Avatar.Fluent 828 835 0.99:1
ButtonMinimalPerf.default 165 169 0.98:1
GridMinimalPerf.default 313 320 0.98:1
StatusMinimalPerf.default 636 646 0.98:1
ListWith60ListItems.default 939 1084 0.87:1

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 28, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ce5794f:

Sandbox Source
Fluent UI Button Configuration
microsoft/fluentui: codesandbox-react-template Configuration
microsoft/fluentui: codesandbox-react-next-template Configuration
microsoft/fluentui: codesandbox-react-northstar-template Configuration

@size-auditor
Copy link

size-auditor bot commented Aug 28, 2020

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 30205c7e182d6fd7f852b6721c55a38917785cf4 (build)

@layershifter
Copy link
Member

Have been added in #15040. Closing for housekeeping 🏡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants