From 5f8120a1f88ece53ed340b723a37378f35ceda98 Mon Sep 17 00:00:00 2001 From: "REDMOND\\humorimo" Date: Mon, 20 May 2019 16:48:06 -0700 Subject: [PATCH 1/3] Button: Adding vr tests. --- .../src/stories/NewButton.stories.tsx | 293 ++++++++++++++++++ .../src/components/Button/Button.styles.ts | 15 +- .../src/components/Button/Button.test.tsx | 2 +- .../components/Button/ButtonVariants.test.tsx | 2 +- .../Button/MenuButton/MenuButton.styles.ts | 10 +- .../Button/MenuButton/MenuButton.test.tsx | 2 +- .../Button/SplitButton/SplitButton.test.tsx | 2 +- .../Button/__snapshots__/Button.test.tsx.snap | 36 +-- .../ButtonVariants.test.tsx.snap | 216 ++++++------- 9 files changed, 440 insertions(+), 138 deletions(-) create mode 100644 apps/vr-tests/src/stories/NewButton.stories.tsx diff --git a/apps/vr-tests/src/stories/NewButton.stories.tsx b/apps/vr-tests/src/stories/NewButton.stories.tsx new file mode 100644 index 00000000000000..ce5e5173367f30 --- /dev/null +++ b/apps/vr-tests/src/stories/NewButton.stories.tsx @@ -0,0 +1,293 @@ +/*! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. */ +import * as React from 'react'; +import Screener, { Steps } from 'screener-storybook/src/screener'; +import { storiesOf } from '@storybook/react'; +import { FabricDecorator } from '../utilities'; +import { + Button, + IButtonProps, + MenuButton, + IMenuButtonProps, + SplitButton, + DefaultButton, + PrimaryButton, + ActionButton, + BaseButton, + CommandBarButton, + CompoundButton, + IconButton, + MessageBarButton +} from '@uifabric/experiments'; +import { Stack, Text } from 'office-ui-fabric-react'; + +const baseProps: IButtonProps = { + icon: 'AddFriend', + content: 'Button' +}; + +const menuProps: IMenuButtonProps = { + content: 'Button', + menu: { + items: [ + { + key: 'a', + name: 'Item a' + }, + { + key: 'b', + name: 'Item b' + } + ] + } +}; + +storiesOf('Button', module) + .addDecorator(FabricDecorator) + .addDecorator(story => ( + + {story()} + + )) + .addStory('Default', () => + ), + { rtl: true } + ); + +storiesOf('Button - Circular', module) + .addDecorator(FabricDecorator) + .addDecorator(story => ( + + {story()} + + )) + .addStory('Default', () =>