Skip to content

Commit

Permalink
chore: remove screener dependencies and various screener removal clea…
Browse files Browse the repository at this point in the history
…nups (#26070)
  • Loading branch information
TristanWatanabe authored Dec 22, 2022
1 parent 36af377 commit a18b520
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 951 deletions.
9 changes: 2 additions & 7 deletions .devops/templates/runpublishvrscreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ steps:
fi
displayName: Check if vrTests should be skipped
- script: |
yarn workspace ${{ parameters.vrTestPackageName }} convert
displayName: Convert screener component to storywright
condition: and(eq(variables['vrTestSkip'], 'no'), eq('${{ parameters.shouldBuildNorthstar }}', 'false'))
- ${{ if eq(parameters.shouldBuildstorybookaddon, 'true') }}:
- script: |
yarn build --to @fluentui/react-storybook-addon
Expand All @@ -57,12 +52,12 @@ steps:
condition: eq(variables['vrTestSkip'], 'no')
- script: |
yarn workspace ${{ parameters.vrTestPackageName }} screener:build
yarn workspace ${{ parameters.vrTestPackageName }} vr:build
displayName: Build VR tests components package
condition: eq(variables['vrTestSkip'], 'no')
- script: |
yarn workspace ${{ parameters.vrTestPackageName }} test:component --verbose
yarn workspace ${{ parameters.vrTestPackageName }} vr:test --verbose
displayName: 'Run VR tests'
condition: eq(variables['vrTestSkip'], 'no')
Expand Down
2 changes: 1 addition & 1 deletion apps/public-docsite-v9/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"moduleResolution": "node",
"preserveConstEnums": true,
"skipLibCheck": true,
"types": ["webpack-env", "@storybook/react", "screener-storybook"]
"types": ["webpack-env", "@storybook/react"]
},
"include": ["src"]
}
23 changes: 0 additions & 23 deletions apps/vr-tests-react-components/convertStoriesToStoryWright.sh

This file was deleted.

7 changes: 3 additions & 4 deletions apps/vr-tests-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
"description": "Visual regression tests for @fluentui/react-components",
"scripts": {
"build": "build-storybook -o dist/storybook",
"convert": "bash convertStoriesToStoryWright.sh",
"clean": "just-scripts clean",
"format": "prettier . -w --ignore-path ../../.prettierignore",
"lint": "just-scripts lint",
"screener:build": "yarn build",
"start": "start-storybook",
"test": "just-scripts test",
"test:component": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true",
"type-check": "tsc"
"type-check": "tsc",
"vr:build": "yarn build",
"vr:test": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
Expand Down
29 changes: 0 additions & 29 deletions apps/vr-tests/convertStoriesToStoryWright.sh

This file was deleted.

7 changes: 3 additions & 4 deletions apps/vr-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
"scripts": {
"build": "just-scripts build",
"clean": "just-scripts clean",
"test:component": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true",
"code-style": "just-scripts code-style",
"convert": "bash convertStoriesToStoryWright.sh",
"just": "just-scripts",
"lint": "just-scripts lint",
"screener:build": "cross-env NODE_OPTIONS=--max-old-space-size=3072 just-scripts storybook:build",
"start": "just-scripts dev:storybook",
"type-check": "tsc"
"type-check": "tsc",
"vr:build": "cross-env NODE_OPTIONS=--max-old-space-size=3072 just-scripts storybook:build",
"vr:test": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "nit: replace screener word usage with storywright.",
"packageName": "@fluentui/eslint-plugin",
"email": "[email protected]",
"dependentChangeType": "none"
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@
"satisfied": "^1.1.1",
"scheduler": "0.20.2",
"schema-utils": "3.1.1",
"screener-storybook": "0.23.0",
"semver": "^6.2.0",
"source-map-loader": "4.0.0",
"storybook-addon-export-to-codesandbox": "0.7.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/utils/configHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
* - config/build
* - stories, for now
* - may need to reconsider for converged components depending on website approach
* - the stories suffix is also used for screener stories in `vr-tests`
* - the stories suffix is also used for storywright stories in `vr-tests`
*/
devDependenciesFiles: [...testFiles, ...docsFiles, ...configFiles, '**/*.stories.tsx'],

Expand Down
6 changes: 0 additions & 6 deletions packages/fluentui/docs/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import { Provider, teamsTheme } from '@fluentui/react-northstar';
import Screener from 'screener-storybook/src/screener';

/** @type {import("@fluentui/react-storybook-addon").FluentParameters} */
export const parameters = { layout: 'none' };
Expand All @@ -18,8 +17,3 @@ export const decorators = [
);
},
];

// For static storybook per https://github.com/screener-io/screener-storybook#testing-with-static-storybook-app
if (typeof window === 'object') {
/** @type {*} */ (window).__screener_storybook__ = require('@storybook/react').getStorybook;
}
4 changes: 2 additions & 2 deletions packages/fluentui/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
"lint": "eslint --ext .js,.ts,.tsx .",
"lint:fix": "yarn lint --fix",
"start": "gulp docs",
"screener:build": "yarn build:storybook",
"start:profile": "cross-env NODE_ENV=production PERF=true gulp docs",
"start:storybook": "start-storybook",
"test:component": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true"
"vr:build": "yarn build:storybook",
"vr:test": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true"
}
}
2 changes: 1 addition & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
{
files: 'apps/vr-tests/**/*',
options: {
// The smaller printWidth for the screener tests promotes readability by preventing test cases
// The smaller printWidth for the storywright tests promotes readability by preventing test cases
// from being squished onto one line (and squished up against each other in consecutive lines)
printWidth: 100,
},
Expand Down
Loading

0 comments on commit a18b520

Please sign in to comment.