diff --git a/.devops/templates/runpublishvrscreenshot.yml b/.devops/templates/runpublishvrscreenshot.yml index 21c94e12087c94..9567585d2355bd 100644 --- a/.devops/templates/runpublishvrscreenshot.yml +++ b/.devops/templates/runpublishvrscreenshot.yml @@ -15,10 +15,6 @@ steps: filePath: yarn-ci.sh displayName: yarn (install packages) - - script: | - yarn workspace ${{ parameters.vrTestPackageName }} convert - displayName: Convert screener component to storywright - - script: | yarn workspace ${{ parameters.vrTestPackageName }} vrt:build displayName: Build VR tests components package diff --git a/apps/vr-tests/convertStoriesToStoryWright.sh b/apps/vr-tests/convertStoriesToStoryWright.sh deleted file mode 100755 index 41fb5038110d40..00000000000000 --- a/apps/vr-tests/convertStoriesToStoryWright.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -#!/usr/bin/env bash - -find ./src -type f |while read fname; do - impor="" - if grep -q "screener-storybook" $fname; then - echo "$fname" - if grep -q "/StoryWright>/g" - diff --git a/apps/vr-tests/package.json b/apps/vr-tests/package.json index 830fa3f6ff2adc..7ad29e3840a2ed 100644 --- a/apps/vr-tests/package.json +++ b/apps/vr-tests/package.json @@ -10,8 +10,6 @@ "code-style": "just-scripts code-style", "convert": "bash convertStoriesToStoryWright.sh", "just": "just-scripts", - "screener": "screener-storybook --conf screener.config.js", - "screener:local": "screener-storybook --conf screener.local.config.js --debug", "start": "start-storybook --port 5555", "test": "just-scripts test", "test:component": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true", @@ -52,8 +50,6 @@ "file-loader": "^0.11.1", "postcss-loader": "^3.0.0", "raw-loader": "^0.5.1", - "screener-runner": "^0.10.43", - "screener-storybook": "^0.18.6", "storybook-readme": "^3.3.0", "storywright": "0.0.26-beta.1", "style-loader": "^1.2.1", diff --git a/apps/vr-tests/screener.config.js b/apps/vr-tests/screener.config.js deleted file mode 100644 index f2f836667fdc31..00000000000000 --- a/apps/vr-tests/screener.config.js +++ /dev/null @@ -1,46 +0,0 @@ -// @ts-check - -const cp = require('child_process'); - -function getCurrentHash() { - try { - const buffer = cp.execSync('git rev-list --parents -n 1 HEAD', { - stdio: ['pipe', 'pipe', process.stderr], - }); - - if (buffer) { - // The command returns a list of hashes, the last one is the one we want - return buffer - .toString() - .trim() - .split(' ') - .pop(); - } - } catch (e) { - console.error('Cannot get current git hash'); - process.exit(1); - } - - return ''; -} - -const baseBranch = process.env.SYSTEM_PULLREQUEST_TARGETBRANCH - ? process.env.SYSTEM_PULLREQUEST_TARGETBRANCH.replace(/^refs\/heads\//, '') - : '7.0'; - -// https://github.com/screener-io/screener-storybook#config-options -const config = { - projectRepo: 'microsoft/fluentui', - storybookConfigDir: '.storybook', - apiKey: process.env.SCREENER_API_KEY, - resolution: '1024x768', - baseBranch, - failureExitCode: 0, - alwaysAcceptBaseBranch: true, - ...(process.env.BUILD_SOURCEBRANCH && process.env.BUILD_SOURCEBRANCH.indexOf('refs/pull') > -1 - ? { commit: getCurrentHash() } - : null), -}; -console.log('Screener config: ' + JSON.stringify({ ...config, apiKey: '...' }, null, 2)); - -module.exports = config; diff --git a/apps/vr-tests/screener.local.config.js b/apps/vr-tests/screener.local.config.js deleted file mode 100644 index e59ddb21c49fe1..00000000000000 --- a/apps/vr-tests/screener.local.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - projectRepo: 'microsoft/fluentui', - storybookConfigDir: '.storybook', - apiKey: process.env.SCREENER_API_KEY, - resolution: '1024x768', - baseBranch: '7.0', - branch: 'localTest', -}; diff --git a/apps/vr-tests/src/stories/ActivityItem.stories.tsx b/apps/vr-tests/src/stories/ActivityItem.stories.tsx index 1ff48503532a15..be8a507d422840 100644 --- a/apps/vr-tests/src/stories/ActivityItem.stories.tsx +++ b/apps/vr-tests/src/stories/ActivityItem.stories.tsx @@ -1,6 +1,6 @@ /*! 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 { Steps, StoryWright } from 'storywright'; import { storiesOf } from '@storybook/react'; import { FabricDecorator } from '../utilities'; import { ActivityItem, Icon } from 'office-ui-fabric-react'; @@ -9,13 +9,13 @@ storiesOf('ActivityItem', module) .addDecorator(FabricDecorator) .addDecorator(story => // prettier-ignore - {story()} - , + , ) .addStory( 'Root', diff --git a/apps/vr-tests/src/stories/Breadcrumb.stories.tsx b/apps/vr-tests/src/stories/Breadcrumb.stories.tsx index 5f5d427e487060..547b65c25d141f 100644 --- a/apps/vr-tests/src/stories/Breadcrumb.stories.tsx +++ b/apps/vr-tests/src/stories/Breadcrumb.stories.tsx @@ -1,6 +1,6 @@ /*! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. */ import * as React from 'react'; -import Screener from 'screener-storybook/src/screener'; +import { Steps, StoryWright } from 'storywright'; import { storiesOf } from '@storybook/react'; import { FabricDecoratorTall } from '../utilities'; import { Breadcrumb } from 'office-ui-fabric-react'; @@ -10,8 +10,8 @@ const noOp = () => undefined; storiesOf('Breadcrumb', module) .addDecorator(FabricDecoratorTall) .addDecorator(story => ( - {story()} - + )) .addStory( 'Root', @@ -77,8 +77,8 @@ storiesOf('Breadcrumb', module) storiesOf('Breadcrumb', module) .addDecorator(FabricDecoratorTall) .addDecorator(story => ( - {story()} - + )) .addStory('Hovering items', () => ( ( - {story()} - + )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) @@ -79,7 +79,7 @@ storiesOf('Button Default', module) storiesOf('Button Action', module) .addDecorator(FabricDecorator) .addDecorator(story => ( - {story()} - + )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) @@ -100,7 +100,7 @@ storiesOf('Button Action', module) storiesOf('Button Compound', module) .addDecorator(FabricDecorator) .addDecorator(story => ( - {story()} - + )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) @@ -130,7 +130,7 @@ storiesOf('Button Command', module) )) .addDecorator(FabricDecoratorTall) .addDecorator(story => ( - {story()} - + )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) @@ -152,7 +152,7 @@ storiesOf('Button Command', module) storiesOf('Button Split', module) .addDecorator(FabricDecoratorTall) .addDecorator(story => ( - {story()} - + )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) @@ -194,9 +194,9 @@ storiesOf('Button Split', module) storiesOf('Button Special Scenarios', module) .addDecorator(FabricDecorator) .addDecorator(story => ( - + {story()} - + )) .addStory('primary with placeholder', () => ( @@ -227,7 +227,7 @@ storiesOf('Button Special Scenarios', module) storiesOf('IconButton Scenarios', module) .addDecorator(FabricDecorator) .addDecorator(story => ( - {story()} - + )) .addStory('normal icon button', () => ( diff --git a/apps/vr-tests/src/stories/ButtonNext.stories.tsx b/apps/vr-tests/src/stories/ButtonNext.stories.tsx index c4deb2b3cd48b7..81e78b9aee51af 100644 --- a/apps/vr-tests/src/stories/ButtonNext.stories.tsx +++ b/apps/vr-tests/src/stories/ButtonNext.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import Screener, { Steps } from 'screener-storybook/src/screener'; +import { Steps, StoryWright } from 'storywright'; import { storiesOf } from '@storybook/react'; import { Button } from '@fluentui/react-button'; import { AddIcon } from '@fluentui/react-icons'; @@ -86,7 +86,7 @@ const TeamsTheme: PartialTheme = { storiesOf('Button Next', module) .addDecorator(FabricDecorator) .addDecorator(story => ( - {story()} - + )) .addStory('Default', () => ) .addStory('Primary', () => ) @@ -133,7 +133,7 @@ storiesOf('Button Next - Teams Theme', module) .addDecorator(FabricDecorator) .addDecorator(withThemeProvider({ theme: TeamsTheme })) .addDecorator(story => ( - {story()} - + )) .addStory('Default', () => ) .addStory('Primary', () => ) @@ -168,7 +168,7 @@ storiesOf('Button Next - With icon before content', module) .addDecorator(FabricDecorator) .addDecorator(withThemeProvider) .addDecorator(story => ( - {story()} - + )) .addStory('Default', () => ) .addStory('Primary', () => ( @@ -231,7 +231,7 @@ storiesOf('Button Next - With icon after content', module) .addDecorator(FabricDecorator) .addDecorator(withThemeProvider) .addDecorator(story => ( - {story()} - + )) .addStory('Default', () => (