diff --git a/.stylelintrc b/.stylelintrc index a0819dac1a..068c957b64 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -66,6 +66,6 @@ "stylelint-use-logical", "stylelint-order", "stylelint-no-unsupported-browser-features", - "@cloudscape-design/build-tools/stylelint" + "@cloudscape-design/build-tools/src/stylelint" ] } diff --git a/build-tools/tasks/copy-shared-utils.js b/build-tools/tasks/copy-shared-utils.js new file mode 100644 index 0000000000..5dffe16664 --- /dev/null +++ b/build-tools/tasks/copy-shared-utils.js @@ -0,0 +1,16 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +const { cpSync } = require('node:fs'); +const path = require('path'); +const { mkdirSync, existsSync } = require('fs'); + +module.exports = function copySharedUtils() { + const targetPath = path.join('lib', 'dev-pages', 'pages', 'shared-utils'); + + if (!existsSync(targetPath)) { + mkdirSync(targetPath, { recursive: true }); + } + + cpSync('node_modules/@cloudscape-design/build-tools/src/test-pages-util', targetPath, { recursive: true }); + return Promise.resolve(); +}; diff --git a/build-tools/tasks/index.js b/build-tools/tasks/index.js index 982a8f6a72..45fecdf772 100644 --- a/build-tools/tasks/index.js +++ b/build-tools/tasks/index.js @@ -18,6 +18,7 @@ module.exports = { integ: require('./integ'), motion: require('./motion'), copyFiles: require('./copy-files'), + copySharedUtils: require('./copy-shared-utils'), themeableSource: require('./themeable-source'), bundleVendorFiles: require('./bundle-vendor-files'), sizeLimit: require('./size-limit'), diff --git a/eslint.config.mjs b/eslint.config.mjs index ee54c8c7ce..ce6491d54b 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -14,7 +14,7 @@ import globals from 'globals'; import path from 'node:path'; import tsEslint from 'typescript-eslint'; -import cloudscapeCommonRules from '@cloudscape-design/build-tools/eslint/index.js'; +import cloudscapeCommonRules from '@cloudscape-design/build-tools/src/eslint/index.js'; import cloudscapeComponentsRules from './build-tools/eslint/index.js'; @@ -48,7 +48,7 @@ export default tsEslint.config( plugins: { 'simple-import-sort': simpleImportSortPlugin, '@cloudscape-design/components': cloudscapeComponentsRules, - '@cloudscape-design/build-tools': cloudscapeCommonRules, + 'git-build-tools': cloudscapeCommonRules, unicorn: unicornPlugin, header: headerPlugin, }, @@ -64,7 +64,7 @@ export default tsEslint.config( 'react/no-unstable-nested-components': ['error', { allowAsProps: true }], 'react/prop-types': 'off', 'react/jsx-boolean-value': ['error', 'always'], - '@cloudscape-design/build-tools/react-server-components-directive': 'error', + 'git-build-tools/react-server-components-directive': 'error', '@cloudscape-design/components/ban-files': [ 'error', [ diff --git a/gulpfile.js b/gulpfile.js index 9d290b74f1..50ef38f2c5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -20,6 +20,7 @@ const { integ, motion, copyFiles, + copySharedUtils, themeableSource, bundleVendorFiles, sizeLimit, @@ -27,7 +28,15 @@ const { const quickBuild = series( clean, - parallel(packageJSON, generateI18nMessages, generateEnvironment, generateIcons, generateIndexFile, copyFiles), + parallel( + packageJSON, + generateI18nMessages, + generateEnvironment, + generateIcons, + generateIndexFile, + copySharedUtils, + copyFiles + ), parallel(generateCustomCssPropertiesMap, styles, typescript, testUtils), bundleVendorFiles ); diff --git a/package.json b/package.json index b316d58904..b834f75e7f 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@babel/core": "^7.23.7", "@babel/plugin-syntax-typescript": "^7.23.3", "@cloudscape-design/browser-test-tools": "^3.0.0", - "@cloudscape-design/build-tools": "^3.0.0", + "@cloudscape-design/build-tools": "github:cloudscape-design/build-tools#add-test-pages-util-permutation-view", "@cloudscape-design/documenter": "^1.0.0", "@cloudscape-design/global-styles": "^1.0.0", "@cloudscape-design/jest-preset": "^2.0.0", diff --git a/pages/alert/permutations.page.tsx b/pages/alert/permutations.page.tsx index 0521f7a537..aec2442468 100644 --- a/pages/alert/permutations.page.tsx +++ b/pages/alert/permutations.page.tsx @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Alert, { AlertProps } from '~components/alert'; import Button from '~components/button'; import ExpandableSection from '~components/expandable-section'; import Link from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { i18nStrings } from './common'; diff --git a/pages/alert/runtime-action.page.tsx b/pages/alert/runtime-action.page.tsx index 804828e660..052dc81f6d 100644 --- a/pages/alert/runtime-action.page.tsx +++ b/pages/alert/runtime-action.page.tsx @@ -2,14 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Alert, { AlertProps } from '~components/alert'; import Button from '~components/button'; import awsuiPlugins from '~components/internal/plugins'; import SpaceBetween from '~components/space-between'; import { mount, unmount } from '~mount'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { i18nStrings } from './common'; diff --git a/pages/area-chart/permutations.page.tsx b/pages/area-chart/permutations.page.tsx index b8b76e9ca6..72a03a5a19 100644 --- a/pages/area-chart/permutations.page.tsx +++ b/pages/area-chart/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { AreaChartProps } from '~components/area-chart'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import Example, { ExampleProps } from './example'; diff --git a/pages/attribute-editor/permutations.page.tsx b/pages/attribute-editor/permutations.page.tsx index ef51b8b666..e78a702f31 100644 --- a/pages/attribute-editor/permutations.page.tsx +++ b/pages/attribute-editor/permutations.page.tsx @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import AttributeEditor, { AttributeEditorProps } from '~components/attribute-editor'; import Box from '~components/box'; import Input from '~components/input'; import StatusIndicator from '~components/status-indicator'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; interface Item { diff --git a/pages/autosuggest/permutations-async.page.tsx b/pages/autosuggest/permutations-async.page.tsx index 35cb7fcceb..44a5f4f5b6 100644 --- a/pages/autosuggest/permutations-async.page.tsx +++ b/pages/autosuggest/permutations-async.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Autosuggest, { AutosuggestProps } from '~components/autosuggest'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const enteredTextLabel = (value: string) => `Use: ${value}`; diff --git a/pages/autosuggest/permutations.page.tsx b/pages/autosuggest/permutations.page.tsx index 37a83d8d23..7be7fec252 100644 --- a/pages/autosuggest/permutations.page.tsx +++ b/pages/autosuggest/permutations.page.tsx @@ -3,10 +3,11 @@ import React from 'react'; import range from 'lodash/range'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Autosuggest, { AutosuggestProps } from '~components/autosuggest'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import img from './images/icon.png'; diff --git a/pages/autosuggest/style-permutations.page.tsx b/pages/autosuggest/style-permutations.page.tsx index 2aa9e234c2..bbca7d20ac 100644 --- a/pages/autosuggest/style-permutations.page.tsx +++ b/pages/autosuggest/style-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Autosuggest, { AutosuggestProps } from '~components/autosuggest'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const style1 = { diff --git a/pages/badge/permutations.page.tsx b/pages/badge/permutations.page.tsx index 0de4c23d0c..2fb16968da 100644 --- a/pages/badge/permutations.page.tsx +++ b/pages/badge/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Badge, { BadgeProps } from '~components/badge'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/bar-chart/horizontal-bars-permutations.page.tsx b/pages/bar-chart/horizontal-bars-permutations.page.tsx index fd3795b70f..b915f4e6b8 100644 --- a/pages/bar-chart/horizontal-bars-permutations.page.tsx +++ b/pages/bar-chart/horizontal-bars-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import BarChart, { BarChartProps } from '~components/bar-chart'; import { commonProps, multipleBarsData } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations>([ diff --git a/pages/bar-chart/horizontal-stacked-bars-permutations.page.tsx b/pages/bar-chart/horizontal-stacked-bars-permutations.page.tsx index 5e2693afe9..be04612d1d 100644 --- a/pages/bar-chart/horizontal-stacked-bars-permutations.page.tsx +++ b/pages/bar-chart/horizontal-stacked-bars-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import BarChart, { BarChartProps } from '~components/bar-chart'; import { commonProps, multipleBarsData } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations>([ diff --git a/pages/bar-chart/other-permutations.page.tsx b/pages/bar-chart/other-permutations.page.tsx index e41f272a38..a87efe9319 100644 --- a/pages/bar-chart/other-permutations.page.tsx +++ b/pages/bar-chart/other-permutations.page.tsx @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import BarChart, { BarChartProps } from '~components/bar-chart'; import { colorChartsThresholdInfo, colorChartsThresholdNeutral } from '~design-tokens'; @@ -14,8 +17,6 @@ import { multipleNegativeBarsData, negativeData, } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { smallBarsData } from './common'; diff --git a/pages/bar-chart/stacked-permutations.page.tsx b/pages/bar-chart/stacked-permutations.page.tsx index b4508ca42a..c739d9904b 100644 --- a/pages/bar-chart/stacked-permutations.page.tsx +++ b/pages/bar-chart/stacked-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import BarChart, { BarChartProps } from '~components/bar-chart'; import { commonProps, multipleNegativeBarsData as data } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const thresholdSeries = { type: 'threshold', title: 'Limit', y: 4 } as const; diff --git a/pages/bar-chart/threshold-permutations.page.tsx b/pages/bar-chart/threshold-permutations.page.tsx index 3415f441b0..1552678934 100644 --- a/pages/bar-chart/threshold-permutations.page.tsx +++ b/pages/bar-chart/threshold-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import BarChart, { BarChartProps } from '~components/bar-chart'; import { commonProps, multipleNegativeBarsDataWithThreshold } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations>([ diff --git a/pages/bar-chart/vertical-bars-permutations.page.tsx b/pages/bar-chart/vertical-bars-permutations.page.tsx index 6f36311df2..a0c0cf685b 100644 --- a/pages/bar-chart/vertical-bars-permutations.page.tsx +++ b/pages/bar-chart/vertical-bars-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import BarChart, { BarChartProps } from '~components/bar-chart'; import { commonProps, multipleBarsData } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations>([ diff --git a/pages/bar-chart/vertical-stacked-bars-permutations.page.tsx b/pages/bar-chart/vertical-stacked-bars-permutations.page.tsx index 68ae97a817..579fa39779 100644 --- a/pages/bar-chart/vertical-stacked-bars-permutations.page.tsx +++ b/pages/bar-chart/vertical-stacked-bars-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import BarChart, { BarChartProps } from '~components/bar-chart'; import { commonProps, multipleBarsData } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations>([ diff --git a/pages/box/elements-with-extra-defaults.page.tsx b/pages/box/elements-with-extra-defaults.page.tsx index bd36a253de..bf9f489704 100644 --- a/pages/box/elements-with-extra-defaults.page.tsx +++ b/pages/box/elements-with-extra-defaults.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box, { BoxProps } from '~components/box'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './style.scss'; diff --git a/pages/box/float-align.page.tsx b/pages/box/float-align.page.tsx index 9225b6b253..6833851b74 100644 --- a/pages/box/float-align.page.tsx +++ b/pages/box/float-align.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box, { BoxProps } from '~components/box'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './style.scss'; diff --git a/pages/box/margins.page.tsx b/pages/box/margins.page.tsx index eea84ab9f5..e767511c63 100644 --- a/pages/box/margins.page.tsx +++ b/pages/box/margins.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box, { BoxProps } from '~components/box'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import spacings from './spacings'; diff --git a/pages/box/paddings.page.tsx b/pages/box/paddings.page.tsx index 9f5080d81d..c42a23a1c2 100644 --- a/pages/box/paddings.page.tsx +++ b/pages/box/paddings.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box, { BoxProps } from '~components/box'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import spacings from './spacings'; diff --git a/pages/box/variants.page.tsx b/pages/box/variants.page.tsx index 6eb5b35158..a81844ccd4 100644 --- a/pages/box/variants.page.tsx +++ b/pages/box/variants.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box, { BoxProps } from '~components/box'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './style.scss'; diff --git a/pages/button-dropdown/item-element.permutations.page.tsx b/pages/button-dropdown/item-element.permutations.page.tsx index 8947aa853f..39228406da 100644 --- a/pages/button-dropdown/item-element.permutations.page.tsx +++ b/pages/button-dropdown/item-element.permutations.page.tsx @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import { ItemProps } from '~components/button-dropdown/interfaces'; import ItemElement from '~components/button-dropdown/item-element'; import img from '../icon/custom-icon.png'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './styles.scss'; diff --git a/pages/button-dropdown/permutations-main-action.page.tsx b/pages/button-dropdown/permutations-main-action.page.tsx index 7a23b4ef8f..fc032fcf16 100644 --- a/pages/button-dropdown/permutations-main-action.page.tsx +++ b/pages/button-dropdown/permutations-main-action.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, SpaceBetween } from '~components'; import ButtonDropdown, { ButtonDropdownProps } from '~components/button-dropdown'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const launchInstanceItem = { diff --git a/pages/button-dropdown/permutations.page.tsx b/pages/button-dropdown/permutations.page.tsx index 2f0dff5b83..7c72dd9e24 100644 --- a/pages/button-dropdown/permutations.page.tsx +++ b/pages/button-dropdown/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ButtonDropdown, { ButtonDropdownProps } from '~components/button-dropdown'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/button-group/item-permutations.page.tsx b/pages/button-group/item-permutations.page.tsx index 8ef0145460..1808c891b3 100644 --- a/pages/button-group/item-permutations.page.tsx +++ b/pages/button-group/item-permutations.page.tsx @@ -3,12 +3,13 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ButtonGroup, { ButtonGroupProps } from '~components/button-group'; import SpaceBetween from '~components/space-between'; import StatusIndicator from '~components/status-indicator'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const itemPermutations = createPermutations([ diff --git a/pages/button-group/permutations.page.tsx b/pages/button-group/permutations.page.tsx index 27b22cac89..222b002a3d 100644 --- a/pages/button-group/permutations.page.tsx +++ b/pages/button-group/permutations.page.tsx @@ -3,10 +3,11 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ButtonGroup, { ButtonGroupProps } from '~components/button-group'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const toggleFeedbackGroup: ButtonGroupProps.Group = { diff --git a/pages/button-trigger/permutations.page.tsx b/pages/button-trigger/permutations.page.tsx index 6277b50406..4faf10f754 100644 --- a/pages/button-trigger/permutations.page.tsx +++ b/pages/button-trigger/permutations.page.tsx @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import ButtonTrigger, { ButtonTriggerProps } from '~components/internal/components/button-trigger'; import Option from '~components/internal/components/option'; import { OptionDefinition } from '~components/internal/components/option/interfaces'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const option1: OptionDefinition = { diff --git a/pages/button/external.permutations.page.tsx b/pages/button/external.permutations.page.tsx index 649e9b1c20..862de6ee20 100644 --- a/pages/button/external.permutations.page.tsx +++ b/pages/button/external.permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Button, { ButtonProps } from '~components/button'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/button/permutations.page.tsx b/pages/button/permutations.page.tsx index 58019477d6..7bc10789c0 100644 --- a/pages/button/permutations.page.tsx +++ b/pages/button/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Button, { ButtonProps } from '~components/button'; import img from '../icon/custom-icon.png'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/button/style-permutations.page.tsx b/pages/button/style-permutations.page.tsx index 93a06b0946..ae190d0234 100644 --- a/pages/button/style-permutations.page.tsx +++ b/pages/button/style-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Button, { ButtonProps } from '~components/button'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/cards/permutations.page.tsx b/pages/cards/permutations.page.tsx index 7d71601455..377ddb155c 100644 --- a/pages/cards/permutations.page.tsx +++ b/pages/cards/permutations.page.tsx @@ -3,14 +3,15 @@ import React from 'react'; import range from 'lodash/range'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Link } from '~components'; import Box from '~components/box'; import Button from '~components/button'; import Cards, { CardsProps } from '~components/cards/index'; import Header from '~components/header'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; interface Item { diff --git a/pages/checkbox/permutations.page.tsx b/pages/checkbox/permutations.page.tsx index a9bc620ecb..6152855ca4 100644 --- a/pages/checkbox/permutations.page.tsx +++ b/pages/checkbox/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Checkbox, { CheckboxProps } from '~components/checkbox'; import Link from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/code-editor/permutations.page.tsx b/pages/code-editor/permutations.page.tsx index 2c3d1054e9..674182777d 100644 --- a/pages/code-editor/permutations.page.tsx +++ b/pages/code-editor/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React, { useEffect, useState } from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import CodeEditor, { CodeEditorProps } from '~components/code-editor'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { i18nStrings, themes } from './base-props'; diff --git a/pages/column-layout/min-width.permutations.page.tsx b/pages/column-layout/min-width.permutations.page.tsx index ed9e90dde8..8905ce11eb 100644 --- a/pages/column-layout/min-width.permutations.page.tsx +++ b/pages/column-layout/min-width.permutations.page.tsx @@ -3,10 +3,11 @@ import * as React from 'react'; import range from 'lodash/range'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ColumnLayout, { ColumnLayoutProps } from '~components/column-layout'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/column-layout/permutations.page.tsx b/pages/column-layout/permutations.page.tsx index d65f9ac5c9..0f050c60ee 100644 --- a/pages/column-layout/permutations.page.tsx +++ b/pages/column-layout/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ColumnLayout, { ColumnLayoutProps } from '~components/column-layout'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; function range(start: number, end: number) { diff --git a/pages/container/media-side-permutations.page.tsx b/pages/container/media-side-permutations.page.tsx index d71d4c6c8c..9a8bb2a1b8 100644 --- a/pages/container/media-side-permutations.page.tsx +++ b/pages/container/media-side-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { ContainerProps } from '~components/container'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { PermutationContainer, PermutationIframe } from './common'; import image43 from './images/4-3.png'; diff --git a/pages/container/media-top-permutations.page.tsx b/pages/container/media-top-permutations.page.tsx index 02e2f327aa..2f52f57747 100644 --- a/pages/container/media-top-permutations.page.tsx +++ b/pages/container/media-top-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { ContainerProps } from '~components/container'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { PermutationContainer, PermutationIframe } from './common'; import image43 from './images/4-3.png'; diff --git a/pages/copy-to-clipboard/permutations.page.tsx b/pages/copy-to-clipboard/permutations.page.tsx index fa561cd6c5..e5204b22a0 100644 --- a/pages/copy-to-clipboard/permutations.page.tsx +++ b/pages/copy-to-clipboard/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { CopyToClipboard, CopyToClipboardProps } from '~components'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/date-input/permutations-formats.page.tsx b/pages/date-input/permutations-formats.page.tsx index c58531b5c0..d554568f1d 100644 --- a/pages/date-input/permutations-formats.page.tsx +++ b/pages/date-input/permutations-formats.page.tsx @@ -3,12 +3,13 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { SpaceBetween } from '~components'; import Box from '~components/box'; import DateInput, { DateInputProps } from '~components/date-input'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { locales } from './common'; diff --git a/pages/date-input/permutations-states.page.tsx b/pages/date-input/permutations-states.page.tsx index fc9abf5a41..4f794ec773 100644 --- a/pages/date-input/permutations-states.page.tsx +++ b/pages/date-input/permutations-states.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import DateInput, { DateInputProps } from '~components/date-input'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/date-picker/permutations-formats.page.tsx b/pages/date-picker/permutations-formats.page.tsx index 7956c8cfe4..c9eb0cb8b8 100644 --- a/pages/date-picker/permutations-formats.page.tsx +++ b/pages/date-picker/permutations-formats.page.tsx @@ -4,11 +4,12 @@ import React from 'react'; import MockDate from 'mockdate'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, DatePicker, DatePickerProps, SpaceBetween } from '~components'; import { locales } from '../date-input/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; // Mock the date in order to have the current day styling in place for screenshot testing. diff --git a/pages/date-picker/permutations.page.tsx b/pages/date-picker/permutations.page.tsx index 98355d0a37..d7a9f41b33 100644 --- a/pages/date-picker/permutations.page.tsx +++ b/pages/date-picker/permutations.page.tsx @@ -4,10 +4,11 @@ import React from 'react'; import MockDate from 'mockdate'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, DatePicker, DatePickerProps, SpaceBetween } from '~components'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import i18nStrings from './i18n-strings'; diff --git a/pages/date-range-picker/absolute-format-day-picker.permutations.page.tsx b/pages/date-range-picker/absolute-format-day-picker.permutations.page.tsx index b2fd31a964..871179d34a 100644 --- a/pages/date-range-picker/absolute-format-day-picker.permutations.page.tsx +++ b/pages/date-range-picker/absolute-format-day-picker.permutations.page.tsx @@ -3,11 +3,12 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { DateRangePicker, DateRangePickerProps } from '~components'; import { PermutationsPage } from '../app/templates'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import { isValid, placeholders } from './common'; const permutations = createPermutations([ diff --git a/pages/date-range-picker/absolute-format-month-picker.permutations.page.tsx b/pages/date-range-picker/absolute-format-month-picker.permutations.page.tsx index b9e4e154f9..d11e0526e0 100644 --- a/pages/date-range-picker/absolute-format-month-picker.permutations.page.tsx +++ b/pages/date-range-picker/absolute-format-month-picker.permutations.page.tsx @@ -3,11 +3,12 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { DateRangePicker, DateRangePickerProps } from '~components'; import { PermutationsPage } from '../app/templates'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import { isValid, placeholders } from './common'; const permutations = createPermutations([ diff --git a/pages/date-range-picker/month-calendar-permutations.page.tsx b/pages/date-range-picker/month-calendar-permutations.page.tsx index 889a2fa9cf..98bbc0d5db 100644 --- a/pages/date-range-picker/month-calendar-permutations.page.tsx +++ b/pages/date-range-picker/month-calendar-permutations.page.tsx @@ -3,13 +3,14 @@ import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import Calendar, { DateRangePickerCalendarProps } from '~components/date-range-picker/calendar'; import Dropdown from '~components/internal/components/dropdown'; import { PermutationsPage } from '../app/templates'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; const intervals = [ ['2021-08-01', '2021-08-31'], diff --git a/pages/date-range-picker/year-calendar-permutations.page.tsx b/pages/date-range-picker/year-calendar-permutations.page.tsx index 5568dcf765..f5d96f6419 100644 --- a/pages/date-range-picker/year-calendar-permutations.page.tsx +++ b/pages/date-range-picker/year-calendar-permutations.page.tsx @@ -3,13 +3,14 @@ import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import Calendar, { DateRangePickerCalendarProps } from '~components/date-range-picker/calendar'; import Dropdown from '~components/internal/components/dropdown'; import { PermutationsPage } from '../app/templates'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; const intervals = [ ['2021-08', '2023-08'], //multi year diff --git a/pages/drag-handle/permutations.page.tsx b/pages/drag-handle/permutations.page.tsx index a4c53cedf8..b79713e67f 100644 --- a/pages/drag-handle/permutations.page.tsx +++ b/pages/drag-handle/permutations.page.tsx @@ -3,10 +3,11 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import DragHandle, { DragHandleProps } from '~components/internal/components/drag-handle'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/drawer/permutations.page.tsx b/pages/drawer/permutations.page.tsx index c8a2b99666..07aea03241 100644 --- a/pages/drawer/permutations.page.tsx +++ b/pages/drawer/permutations.page.tsx @@ -3,10 +3,11 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Drawer, DrawerProps } from '~components'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/dropdown-status/permutations.page.tsx b/pages/dropdown-status/permutations.page.tsx index f0738dcb5b..7137b130ca 100644 --- a/pages/dropdown-status/permutations.page.tsx +++ b/pages/dropdown-status/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import DropdownStatus from '~components/internal/components/dropdown-status'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/expandable-section/container-variant.permutations.page.tsx b/pages/expandable-section/container-variant.permutations.page.tsx index 96081e5b17..8002d4029f 100644 --- a/pages/expandable-section/container-variant.permutations.page.tsx +++ b/pages/expandable-section/container-variant.permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ExpandableSection, { ExpandableSectionProps } from '~components/expandable-section'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { headerActions, headerInfo, headerTextActions } from './common'; diff --git a/pages/expandable-section/permutations.page.tsx b/pages/expandable-section/permutations.page.tsx index 7ffc5519f2..b88d3c313b 100644 --- a/pages/expandable-section/permutations.page.tsx +++ b/pages/expandable-section/permutations.page.tsx @@ -2,14 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Button from '~components/button'; import Container from '~components/container'; import ExpandableSection, { ExpandableSectionProps } from '~components/expandable-section'; import Header from '~components/header'; import Table from '~components/table'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; /* eslint-disable react/jsx-key */ diff --git a/pages/file-token-group/permutations.page.tsx b/pages/file-token-group/permutations.page.tsx index 83e65aeb74..8d02202be8 100644 --- a/pages/file-token-group/permutations.page.tsx +++ b/pages/file-token-group/permutations.page.tsx @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import FileTokenGroup, { FileTokenGroupProps } from '~components/file-token-group'; import { I18nProvider } from '~components/i18n'; import messages from '~components/i18n/messages/all.en'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const file1 = new File([new Blob(['demo content 1'])], 'demo file 1', { type: 'image/*' }); diff --git a/pages/file-upload/permutations.page.tsx b/pages/file-upload/permutations.page.tsx index cb0348755a..afa6d447bf 100644 --- a/pages/file-upload/permutations.page.tsx +++ b/pages/file-upload/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box } from '~components'; import FileUpload, { FileUploadProps } from '~components/file-upload'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { i18nStrings } from './shared'; diff --git a/pages/flashbar/collapsible.permutations.page.tsx b/pages/flashbar/collapsible.permutations.page.tsx index 2308ddcae0..ddeacfc626 100644 --- a/pages/flashbar/collapsible.permutations.page.tsx +++ b/pages/flashbar/collapsible.permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Flashbar, { FlashbarProps } from '~components/flashbar'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { sampleNotifications } from './common'; diff --git a/pages/flashbar/content-permutations.page.tsx b/pages/flashbar/content-permutations.page.tsx index bc5db8915d..1543d68233 100644 --- a/pages/flashbar/content-permutations.page.tsx +++ b/pages/flashbar/content-permutations.page.tsx @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import Flashbar, { FlashbarProps } from '~components/flashbar'; import Link from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const noop = () => void 0; diff --git a/pages/flashbar/permutations.page.tsx b/pages/flashbar/permutations.page.tsx index a3b245e505..b4fd10c672 100644 --- a/pages/flashbar/permutations.page.tsx +++ b/pages/flashbar/permutations.page.tsx @@ -2,14 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import Button from '~components/button'; import ExpandableSection from '~components/expandable-section'; import Flashbar, { FlashbarProps } from '~components/flashbar'; import Link from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const noop = () => void 0; diff --git a/pages/flashbar/runtime-action.page.tsx b/pages/flashbar/runtime-action.page.tsx index 54d0947091..9d20d324a3 100644 --- a/pages/flashbar/runtime-action.page.tsx +++ b/pages/flashbar/runtime-action.page.tsx @@ -2,14 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Button from '~components/button'; import Flashbar, { FlashbarProps } from '~components/flashbar'; import awsuiPlugins from '~components/internal/plugins'; import SpaceBetween from '~components/space-between'; import { mount, unmount } from '~mount'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; awsuiPlugins.flashbar.registerAction({ diff --git a/pages/form-field/permutations.page.tsx b/pages/form-field/permutations.page.tsx index 8b03bdb64e..480aee7c97 100644 --- a/pages/form-field/permutations.page.tsx +++ b/pages/form-field/permutations.page.tsx @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Checkbox from '~components/checkbox'; import FormField, { FormFieldProps } from '~components/form-field'; import Icon from '~components/icon'; @@ -10,8 +13,6 @@ import Link from '~components/link'; import RadioGroup from '~components/radio-group'; import Textarea from '~components/textarea'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; /* eslint-disable react/jsx-key */ diff --git a/pages/form/permutations.page.tsx b/pages/form/permutations.page.tsx index 403aae127f..bc2f3bb4cb 100644 --- a/pages/form/permutations.page.tsx +++ b/pages/form/permutations.page.tsx @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Button from '~components/button'; import ButtonDropdown from '~components/button-dropdown'; import Container from '~components/container'; @@ -12,8 +15,6 @@ import Input from '~components/input'; import Link from '~components/link'; import SpaceBetween from '~components/space-between'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; /* eslint-disable react/jsx-key */ diff --git a/pages/header/permutations.page.tsx b/pages/header/permutations.page.tsx index f13fa8a7e5..66ae6e9586 100644 --- a/pages/header/permutations.page.tsx +++ b/pages/header/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Button, Link, Spinner } from '~components'; import Header, { HeaderProps } from '~components/header'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/input/permutations.page.tsx b/pages/input/permutations.page.tsx index 9c55bd9c66..e7dd395acf 100644 --- a/pages/input/permutations.page.tsx +++ b/pages/input/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Input, { InputProps } from '~components/input'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/input/style-permutations.page.tsx b/pages/input/style-permutations.page.tsx index dd2a0d5dc0..6fab0f482b 100644 --- a/pages/input/style-permutations.page.tsx +++ b/pages/input/style-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Input, { InputProps } from '~components/input'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/key-value-pairs/permutations.page.tsx b/pages/key-value-pairs/permutations.page.tsx index deb2bde505..1c6f6ea769 100644 --- a/pages/key-value-pairs/permutations.page.tsx +++ b/pages/key-value-pairs/permutations.page.tsx @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { CopyToClipboard, ProgressBar } from '~components'; import Icon from '~components/icon'; import KeyValuePairs, { KeyValuePairsProps } from '~components/key-value-pairs'; @@ -9,8 +12,6 @@ import Link from '~components/link'; import SpaceBetween from '~components/space-between'; import StatusIndicator from '~components/status-indicator'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/line-chart/permutations.page.tsx b/pages/line-chart/permutations.page.tsx index b8286a8020..27c69cb97c 100644 --- a/pages/line-chart/permutations.page.tsx +++ b/pages/line-chart/permutations.page.tsx @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, Toggle } from '~components'; import LineChart, { LineChartProps } from '~components/line-chart'; import { @@ -22,8 +25,6 @@ import { multipleBarsData, negativeData, } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const timeLatencyData = latencyData.map(({ time, p90 }) => ({ x: time, y: p90 })); diff --git a/pages/link/icon-overflow-permutations.page.tsx b/pages/link/icon-overflow-permutations.page.tsx index b790941f58..46f522921f 100644 --- a/pages/link/icon-overflow-permutations.page.tsx +++ b/pages/link/icon-overflow-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Link, { LinkProps } from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './styles.scss'; diff --git a/pages/link/inherit-permutations.page.tsx b/pages/link/inherit-permutations.page.tsx index 23160a5448..d8fd31b29b 100644 --- a/pages/link/inherit-permutations.page.tsx +++ b/pages/link/inherit-permutations.page.tsx @@ -3,11 +3,12 @@ import React from 'react'; import clsx from 'clsx'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box, { BoxProps } from '~components/box'; import Link, { LinkProps } from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './styles.scss'; diff --git a/pages/link/long-label-permutations.page.tsx b/pages/link/long-label-permutations.page.tsx index 16776a0927..31d36af0f0 100644 --- a/pages/link/long-label-permutations.page.tsx +++ b/pages/link/long-label-permutations.page.tsx @@ -3,10 +3,11 @@ import React from 'react'; import clsx from 'clsx'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Link, { LinkProps } from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './styles.scss'; diff --git a/pages/link/permutations.page.tsx b/pages/link/permutations.page.tsx index 7070bd34ca..9c287e02eb 100644 --- a/pages/link/permutations.page.tsx +++ b/pages/link/permutations.page.tsx @@ -3,10 +3,11 @@ import React from 'react'; import clsx from 'clsx'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Link, { LinkProps } from '~components/link'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './styles.scss'; diff --git a/pages/list/permutations.page.tsx b/pages/list/permutations.page.tsx index 87ab07339d..6a7a539fc0 100644 --- a/pages/list/permutations.page.tsx +++ b/pages/list/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, ButtonDropdown, Icon, SpaceBetween } from '~components'; import List, { ListProps } from '~components/list'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; interface Item { diff --git a/pages/list/sortable-permutations.page.tsx b/pages/list/sortable-permutations.page.tsx index 21ec7cd5a6..33e659bbcc 100644 --- a/pages/list/sortable-permutations.page.tsx +++ b/pages/list/sortable-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, ButtonDropdown, SpaceBetween } from '~components'; import List, { ListProps } from '~components/list'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; interface Item { diff --git a/pages/mixed-line-bar-chart/permutations.page.tsx b/pages/mixed-line-bar-chart/permutations.page.tsx index db0d7a41fe..81a00da762 100644 --- a/pages/mixed-line-bar-chart/permutations.page.tsx +++ b/pages/mixed-line-bar-chart/permutations.page.tsx @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, Toggle } from '~components'; import MixedLineBarChart, { MixedLineBarChartProps } from '~components/mixed-line-bar-chart'; import { colorChartsStatusHigh, colorChartsThresholdNeutral } from '~design-tokens'; @@ -16,8 +19,6 @@ import { latencyData, logarithmicData, } from '../mixed-line-bar-chart/common'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const timeLatencyData = latencyData.map(({ time, p90 }) => ({ x: time, y: p90 })); diff --git a/pages/multiselect/inline-label-text-permutations.page.tsx b/pages/multiselect/inline-label-text-permutations.page.tsx index 0eadcfa8ca..6bae979996 100644 --- a/pages/multiselect/inline-label-text-permutations.page.tsx +++ b/pages/multiselect/inline-label-text-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Multiselect, { MultiselectProps } from '~components/multiselect'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { deselectAriaLabel, i18nStrings } from './constants'; diff --git a/pages/multiselect/permutations.page.tsx b/pages/multiselect/permutations.page.tsx index 95d2683f7e..5c1d270e6c 100644 --- a/pages/multiselect/permutations.page.tsx +++ b/pages/multiselect/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { OptionDefinition, OptionGroup } from '~components/internal/components/option/interfaces'; import Multiselect, { MultiselectProps } from '~components/multiselect'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { deselectAriaLabel, i18nStrings } from './constants'; diff --git a/pages/option/permutations.page.tsx b/pages/option/permutations.page.tsx index 0d4214c1c4..dd2e6f9e0b 100644 --- a/pages/option/permutations.page.tsx +++ b/pages/option/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Option from '~components/internal/components/option'; import { OptionProps } from '~components/internal/components/option'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/pagination/permutations.page.tsx b/pages/pagination/permutations.page.tsx index 6a8db3b507..5ee18ee619 100644 --- a/pages/pagination/permutations.page.tsx +++ b/pages/pagination/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Pagination, { PaginationProps } from '~components/pagination'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const paginationLabels: PaginationProps.Labels = { diff --git a/pages/pie-chart/permutations.page.tsx b/pages/pie-chart/permutations.page.tsx index 686781c0d7..0e7551ec04 100644 --- a/pages/pie-chart/permutations.page.tsx +++ b/pages/pie-chart/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, Toggle } from '~components'; import PieChart, { PieChartProps } from '~components/pie-chart'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { commonProps, data1, overlappingData, segmentDescription1 } from './common'; diff --git a/pages/popover/text-wrap.page.tsx b/pages/popover/text-wrap.page.tsx index a374f9682c..3b5a9bab18 100644 --- a/pages/popover/text-wrap.page.tsx +++ b/pages/popover/text-wrap.page.tsx @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Popover, { PopoverProps } from '~components/popover'; import PopoverBody, { PopoverBodyProps } from '~components/popover/body'; import FocusTarget from '../common/focus-target'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const noop = () => {}; diff --git a/pages/progress-bar/permutations-standalone.page.tsx b/pages/progress-bar/permutations-standalone.page.tsx index 6db72c9f35..746a904376 100644 --- a/pages/progress-bar/permutations-standalone.page.tsx +++ b/pages/progress-bar/permutations-standalone.page.tsx @@ -2,9 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ProgressBar from '~components/progress-bar'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import permutations from './permutations-utils'; diff --git a/pages/progress-bar/permutations-utils.tsx b/pages/progress-bar/permutations-utils.tsx index cb89d84f5d..e3d4208f77 100644 --- a/pages/progress-bar/permutations-utils.tsx +++ b/pages/progress-bar/permutations-utils.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; -import { ProgressBarProps } from '~components/progress-bar'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; -import createPermutations from '../utils/permutations'; +import { ProgressBarProps } from '~components/progress-bar'; const repeat = (text: string, times: number): string => { const returnArray = []; diff --git a/pages/progress-bar/style-permutations.page.tsx b/pages/progress-bar/style-permutations.page.tsx index f998e8d9e5..1b246c123b 100644 --- a/pages/progress-bar/style-permutations.page.tsx +++ b/pages/progress-bar/style-permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import ProgressBar, { ProgressBarProps } from '~components/progress-bar'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/prompt-input/permutations.page.tsx b/pages/prompt-input/permutations.page.tsx index 70d0693421..d40b6f2e81 100644 --- a/pages/prompt-input/permutations.page.tsx +++ b/pages/prompt-input/permutations.page.tsx @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Button, FileTokenGroup } from '~components'; import PromptInput, { PromptInputProps } from '~components/prompt-input'; import img from '../icon/custom-icon.png'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const permutations = createPermutations([ diff --git a/pages/prompt-input/style-permutations.page.tsx b/pages/prompt-input/style-permutations.page.tsx index c6d756d240..73fff9739a 100644 --- a/pages/prompt-input/style-permutations.page.tsx +++ b/pages/prompt-input/style-permutations.page.tsx @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Button, FileTokenGroup } from '~components'; import PromptInput, { PromptInputProps } from '~components/prompt-input'; import img from '../icon/custom-icon.png'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const style1: PromptInputProps.Style = { diff --git a/pages/property-filter/permutations.page.tsx b/pages/property-filter/permutations.page.tsx index 9c41fe13c0..beab19a364 100644 --- a/pages/property-filter/permutations.page.tsx +++ b/pages/property-filter/permutations.page.tsx @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { ButtonDropdown } from '~components'; import FormField from '~components/form-field'; import PropertyFilter, { PropertyFilterProps } from '~components/property-filter'; import Select from '~components/select'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { columnDefinitions, filteringProperties, i18nStrings, labels } from './common-props'; import { allItems, TableItem } from './table.data'; diff --git a/pages/property-filter/property-filter-editor-permutations.page.tsx b/pages/property-filter/property-filter-editor-permutations.page.tsx index 8596f4ca37..4d3b277f86 100644 --- a/pages/property-filter/property-filter-editor-permutations.page.tsx +++ b/pages/property-filter/property-filter-editor-permutations.page.tsx @@ -4,6 +4,9 @@ import React, { useState } from 'react'; import { format } from 'date-fns'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { DatePicker, FormField, TimeInput } from '~components'; import { I18nProvider } from '~components/i18n'; import messages from '~components/i18n/messages/all.en'; @@ -11,8 +14,6 @@ import { usePropertyFilterI18n } from '~components/property-filter/i18n-utils'; import { InternalFilteringProperty } from '~components/property-filter/interfaces'; import { TokenEditor, TokenEditorProps } from '~components/property-filter/token-editor'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { i18nStrings } from './common-props'; diff --git a/pages/property-filter/property-filter-tokens-permutations.page.tsx b/pages/property-filter/property-filter-tokens-permutations.page.tsx index 95bfc018a3..a52473f3d2 100644 --- a/pages/property-filter/property-filter-tokens-permutations.page.tsx +++ b/pages/property-filter/property-filter-tokens-permutations.page.tsx @@ -3,11 +3,12 @@ import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import TokenList, { TokenListProps } from '~components/internal/components/token-list'; import FilteringToken, { FilteringTokenProps } from '~components/property-filter/filtering-token'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const token1 = { diff --git a/pages/radio-button/common.tsx b/pages/radio-button/common.tsx index 44c99302c8..6bb689e29c 100644 --- a/pages/radio-button/common.tsx +++ b/pages/radio-button/common.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; -import RadioButton, { RadioButtonProps } from '~components/radio-button'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; -import createPermutations from '../utils/permutations'; +import RadioButton, { RadioButtonProps } from '~components/radio-button'; const shortText = 'Short text'; diff --git a/pages/radio-button/permutations.page.tsx b/pages/radio-button/permutations.page.tsx index b952259482..499438ea6b 100644 --- a/pages/radio-button/permutations.page.tsx +++ b/pages/radio-button/permutations.page.tsx @@ -2,8 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { SimplePage } from '../app/templates'; -import PermutationsView from '../utils/permutations-view'; import { permutations, RadioButtonPermutation } from './common'; export default function RadioButtonPermutations() { diff --git a/pages/radio-button/style-custom.page.tsx b/pages/radio-button/style-custom.page.tsx index dd028d7752..ddd547a4e1 100644 --- a/pages/radio-button/style-custom.page.tsx +++ b/pages/radio-button/style-custom.page.tsx @@ -2,8 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { SimplePage } from '../app/templates'; -import PermutationsView from '../utils/permutations-view'; import { permutations, RadioButtonPermutation } from './common'; import customStyle from './custom-style'; diff --git a/pages/radio-group/common-permutations.tsx b/pages/radio-group/common-permutations.tsx index a5583b74aa..d35fa3229c 100644 --- a/pages/radio-group/common-permutations.tsx +++ b/pages/radio-group/common-permutations.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Link from '~components/link'; import { RadioGroupProps } from '~components/radio-group'; import { longText } from '../radio-button/common'; -import createPermutations from '../utils/permutations'; const permutations = createPermutations([ { diff --git a/pages/radio-group/horizontal.permutations.page.tsx b/pages/radio-group/horizontal.permutations.page.tsx index 2c7f746589..021c4a58df 100644 --- a/pages/radio-group/horizontal.permutations.page.tsx +++ b/pages/radio-group/horizontal.permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Box from '~components/box'; import RadioGroup, { RadioGroupProps } from '~components/radio-group'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import permutations from './common-permutations'; diff --git a/pages/radio-group/permutations.page.tsx b/pages/radio-group/permutations.page.tsx index 34be6aef7d..9d554d85bf 100644 --- a/pages/radio-group/permutations.page.tsx +++ b/pages/radio-group/permutations.page.tsx @@ -2,9 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import RadioGroup from '~components/radio-group'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import permutations from './common-permutations'; diff --git a/pages/s3-resource-selector/permutations.page.tsx b/pages/s3-resource-selector/permutations.page.tsx index bafd477f97..db701b9a06 100644 --- a/pages/s3-resource-selector/permutations.page.tsx +++ b/pages/s3-resource-selector/permutations.page.tsx @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Alert from '~components/alert'; import S3ResourceSelector, { S3ResourceSelectorProps } from '~components/s3-resource-selector'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; import { i18nStrings } from './data/i18n-strings'; import { fetchBuckets, fetchObjects, fetchVersions } from './data/request'; diff --git a/pages/segmented-control/permutations.page.tsx b/pages/segmented-control/permutations.page.tsx index 1e1368089f..d2d897d6ca 100644 --- a/pages/segmented-control/permutations.page.tsx +++ b/pages/segmented-control/permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import SegmentedControl, { SegmentedControlProps } from '~components/segmented-control'; import img from '../icon/custom-icon.png'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const iconSvg = ( diff --git a/pages/segmented-control/style-permutations.page.tsx b/pages/segmented-control/style-permutations.page.tsx index 91176641cd..be1d7d8bf5 100644 --- a/pages/segmented-control/style-permutations.page.tsx +++ b/pages/segmented-control/style-permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import SegmentedControl, { SegmentedControlProps } from '~components/segmented-control'; import img from '../icon/custom-icon.png'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const style1: SegmentedControlProps['style'] = { diff --git a/pages/select/item.permutations.page.tsx b/pages/select/item.permutations.page.tsx index e82da7c9a8..c5e3ebdc8f 100644 --- a/pages/select/item.permutations.page.tsx +++ b/pages/select/item.permutations.page.tsx @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { DropdownOption } from '~components/internal/components/option/interfaces'; import Item from '~components/select/parts/item'; import { ItemProps } from '~components/select/parts/item'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const complexOption: DropdownOption = { diff --git a/pages/select/trigger.permutations.page.tsx b/pages/select/trigger.permutations.page.tsx index 944e7624f1..f24b8c0d9d 100644 --- a/pages/select/trigger.permutations.page.tsx +++ b/pages/select/trigger.permutations.page.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { createPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; +import { PermutationsView } from '@cloudscape-design/build-tools/src/test-pages-util'; + import { Box, SelectProps } from '~components'; import Trigger, { TriggerProps } from '~components/select/parts/trigger'; -import createPermutations from '../utils/permutations'; -import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; const complexOption: SelectProps.Option = { diff --git a/pages/selectable-item/common.tsx b/pages/selectable-item/common.tsx index d43eefa806..61c49cb3a6 100644 --- a/pages/selectable-item/common.tsx +++ b/pages/selectable-item/common.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import React from 'react'; +import { ComponentPermutations } from '@cloudscape-design/build-tools/src/test-pages-util'; + import Option from '~components/internal/components/option'; import { SelectableItemProps } from '~components/internal/components/selectable-item'; -import { ComponentPermutations } from '../utils/permutations'; - const simpleOption =