forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1JS VRT tooll add pipeline to generate V8 screenshots (microsoft#25643)
- Loading branch information
1 parent
129c4cf
commit a021496
Showing
9 changed files
with
226 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
parameters: | ||
- name: fluentVersion | ||
type: string | ||
default: v8 | ||
- name: vrTestPackageName | ||
type: string | ||
default: '@fluentui/vr-tests' | ||
- name: vrTestPackagePath | ||
type: string | ||
default: 'apps/vr-tests' | ||
- name: shouldBuildstorybookaddon | ||
type: boolean | ||
default: false | ||
|
||
steps: | ||
- task: Bash@3 | ||
inputs: | ||
filePath: yarn-ci.sh | ||
displayName: yarn (install packages) | ||
|
||
- script: | | ||
yarn workspace ${{ parameters.vrTestPackageName }} convert | ||
displayName: Convert screener component to storywright | ||
- ${{ if eq(parameters.shouldBuildstorybookaddon, 'true') }}: | ||
- script: | | ||
yarn build --to @fluentui/react-storybook-addon | ||
displayName: Build react-storybook-addon | ||
- script: | | ||
yarn workspace ${{ parameters.vrTestPackageName }} screener:build | ||
displayName: Build VR tests components package | ||
- script: | | ||
yarn workspace ${{ parameters.vrTestPackageName }} test:component --verbose | ||
displayName: 'Run VR tests' | ||
- script: | | ||
mkdir -p screenshots | ||
cp -rf ${{ parameters.vrTestPackagePath }}/dist/screenshots/*.png screenshots/ | ||
displayName: Collate Artifacts | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
PathtoPublish: 'screenshots' | ||
ArtifactName: 'vrscreenshot${{ parameters.fluentVersion }}' | ||
publishLocation: 'Container' |
26 changes: 22 additions & 4 deletions
26
apps/vr-tests-react-components/convertStoriesToStoryWright.sh
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
find ./src/stories/ -type f | xargs sed -i "s/import.*Screener.*screener'/import { StoryWright, Steps } from 'storywright'/g" | ||
find ./src/stories/ -type f | xargs sed -i "s/Screener.Steps/Steps/g" | ||
find ./src/stories/ -type f | xargs sed -i "s/Screener/StoryWright/g" | ||
|
||
find ./src -type f |while read fname; do | ||
impor="" | ||
if grep -q "screener-storybook" $fname; then | ||
echo "$fname" | ||
if grep -q "<Screener" $fname; then | ||
impor="${impor}StoryWright, " | ||
fi | ||
if grep -q "Steps(" $fname; then | ||
impor="${impor}Steps, " | ||
fi | ||
if grep "Step " $fname; then | ||
impor="${impor}Step , " | ||
fi | ||
fi | ||
impor="${impor%??}" | ||
sed -i "s/import.*screener'/import { ${impor} } from 'storywright'/g" $fname | ||
done | ||
|
||
find ./src -type f | xargs sed -i "s/Screener.Steps/Steps/g" | ||
find ./src -type f | xargs sed -i "s/<Screener/<StoryWright/g" | ||
find ./src -type f | xargs sed -i "s/Screener>/StoryWright>/g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/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 "<Screener" $fname; then | ||
impor="${impor}StoryWright, " | ||
fi | ||
if grep -q "Steps(" $fname; then | ||
impor="${impor}Steps, " | ||
fi | ||
if grep "Step " $fname; then | ||
impor="${impor}Step , " | ||
fi | ||
fi | ||
impor="${impor%??}" | ||
sed -i "s/import.*screener'/import { ${impor} } from 'storywright'/g" $fname | ||
done | ||
|
||
find ./src -type f | xargs sed -i "s/Screener.Steps/Steps/g" | ||
find ./src -type f | xargs sed -i "s/<Screener/<StoryWright/g" | ||
find ./src -type f | xargs sed -i "s/Screener>/StoryWright>/g" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.