Skip to content

Commit

Permalink
chore(vr-tests-v9): Convert Button VR tests to CSF (#25108)
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanWatanabe authored Nov 2, 2022
1 parent cd78876 commit 008d52d
Show file tree
Hide file tree
Showing 19 changed files with 887 additions and 579 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/screener-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ jobs:
printenv | sort ;\
echo "SHELLOPTS $SHELLOPTS" ;\
- name: build vr-tests-react-components storybook
run: yarn lage build --to @fluentui/vr-tests-react-components
if: ${{env.SKIP_SCREENER_BUILD == 'false'}}

- name: build vr-tests-react-components storybook
run: yarn workspace @fluentui/vr-tests-react-components screener:build
if: ${{env.SKIP_SCREENER_BUILD == 'false'}}
Expand Down
2 changes: 2 additions & 0 deletions apps/vr-tests-react-components/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const path = require('path');
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');

module.exports = /** @type {import('../../../.storybook/main').StorybookBaseConfig} */ ({
addons: ['@fluentui/react-storybook-addon'],

stories: ['../src/**/*.stories.tsx'],
core: {
builder: 'webpack5',
Expand Down
3 changes: 2 additions & 1 deletion apps/vr-tests-react-components/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ setAddon({
},
});

export const parameters = { layout: 'none' };
/** @type {import("@fluentui/react-storybook-addon").FluentParameters} */
export const parameters = { layout: 'none', mode: 'vr-test' };

// For static storybook per https://github.com/screener-io/screener-storybook#testing-with-static-storybook-app
if (typeof window === 'object') {
Expand Down
18 changes: 18 additions & 0 deletions apps/vr-tests-react-components/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// @ts-check

/**
* @type {import('@jest/types').Config.InitialOptions}
*/
module.exports = {
displayName: 'vr-tests-react-components',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.json',
diagnostics: false,
},
},
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
};
3 changes: 3 additions & 0 deletions apps/vr-tests-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"screener": "just-scripts screener",
"screener:build": "yarn build",
"start": "start-storybook",
"test": "just-scripts test",
"type-check": "tsc"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
"@fluentui/scripts": "^1.0.0",
"storywright": "0.0.23-beta.6"
},
"dependencies": {
Expand Down Expand Up @@ -46,6 +48,7 @@
"@fluentui/react-slider": "^9.0.9",
"@fluentui/react-spinner": "^9.0.9",
"@fluentui/react-spinbutton": "^9.0.7",
"@fluentui/react-storybook-addon": "^9.0.0-rc.1",
"@fluentui/react-switch": "^9.0.10",
"@fluentui/react-tabs": "^9.0.10",
"@fluentui/react-table": "9.0.0-alpha.10",
Expand Down
Loading

0 comments on commit 008d52d

Please sign in to comment.