diff --git a/.github/test-a-feature.md b/.github/test-a-feature.md index 76d7371b8d..eb4c970fe3 100644 --- a/.github/test-a-feature.md +++ b/.github/test-a-feature.md @@ -51,9 +51,9 @@ These tests are typically imported into individual component tests. Every common test receives your component as its first argument. ```tsx -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Divider from 'src/components/Divider/Divider' +import { Divider } from '@fluentui/react' describe('Divider', () => { isConformant(Divider) @@ -85,9 +85,9 @@ There should be one describe block for each prop of your component. Example for `Button` component: ```tsx -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Button from 'src/components/Button' +import { Button } from '@fluentui/react' describe('Button', () => { isConformant(Button) @@ -242,7 +242,7 @@ Add your spec file into the array of files `skipSpecChecksForFiles` in `testHelp ## Performance Tests -Performance tests will measure performance, set a baseline for performance and help guard against regressions. +Performance tests will measure performance, set a baseline for performance and help guard against regressions. ### Adding a Perf Test diff --git a/build/screener/screener.config.js b/build/screener/screener.config.js index c4c7cdd1ba..1799f0c5ef 100644 --- a/build/screener/screener.config.js +++ b/build/screener/screener.config.js @@ -1,7 +1,10 @@ require('@fluentui/internal-tooling/babel/register') const config = require('../config').default -const { compilerOptions } = require('../tsconfig.docs.json') + +// Ensure that paths to local packages are interpreted properly +// (see https://github.com/microsoft/fluent-ui-react/pull/837) +const { compilerOptions } = require('../../tsconfig.json') require('tsconfig-paths').register({ baseUrl: config.path_base, diff --git a/build/tsconfig.common.json b/build/tsconfig.common.json index b19551ccc6..af762b0def 100644 --- a/build/tsconfig.common.json +++ b/build/tsconfig.common.json @@ -3,14 +3,6 @@ "module": "commonjs", "target": "es5", "lib": ["es2015", "dom"], - "baseUrl": "../", - "paths": { - "@fluentui/docs": ["docs"], - "@fluentui/e2e": ["e2e"], - "@fluentui/internal-tooling": ["build"], - "@fluentui/perf": ["perf"], - "@fluentui/*": ["packages/*/src"] - }, "types": ["node", "jest"], "typeRoots": ["../types", "../node_modules/@types"], "jsx": "react", diff --git a/build/tsconfig.docs.json b/build/tsconfig.docs.json index 93fc104626..e66fd871e2 100644 --- a/build/tsconfig.docs.json +++ b/build/tsconfig.docs.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.common.json", "compilerOptions": { "module": "esnext", + "baseUrl": "../", "paths": { "@fluentui/*": ["packages/*/src"], "docs/*": ["docs/*"], diff --git a/gulpfile.ts b/gulpfile.ts index 8d55b61295..0c9089244d 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -4,17 +4,19 @@ import * as tsPaths from 'tsconfig-paths' import config from './build/config' -const { compilerOptions } = require('./build/tsconfig.docs.json') - -// add node_modules/.bin to the path so we can invoke .bin CLIs in tasks -process.env.PATH = - process.env.PATH + path.delimiter + path.resolve(__dirname, 'node_modules', '.bin') +// Ensure that paths to local packages are interpreted properly +// (see https://github.com/microsoft/fluent-ui-react/pull/837) +const { compilerOptions } = require('./tsconfig.json') tsPaths.register({ baseUrl: config.path_base, paths: compilerOptions.paths, }) +// add node_modules/.bin to the path so we can invoke .bin CLIs in tasks +process.env.PATH = + process.env.PATH + path.delimiter + path.resolve(__dirname, 'node_modules', '.bin') + // load tasks in order of dependency usage require('./build/gulp/tasks/bundle') require('./build/gulp/tasks/docs') diff --git a/packages/accessibility/test/behaviors/behavior-test.tsx b/packages/accessibility/test/behaviors/behavior-test.tsx index 32125a553e..b2d9edfc76 100644 --- a/packages/accessibility/test/behaviors/behavior-test.tsx +++ b/packages/accessibility/test/behaviors/behavior-test.tsx @@ -83,6 +83,7 @@ import { import { TestHelper } from './testHelper' import definitions from './testDefinitions' +// TODO (@ecraig12345) - remove relative docs import const behaviorMenuItems = require('../../../../docs/src/behaviorMenu') const testHelper = new TestHelper() diff --git a/packages/accessibility/tsconfig.json b/packages/accessibility/tsconfig.json index 8f5e7878bf..8b0364c70f 100644 --- a/packages/accessibility/tsconfig.json +++ b/packages/accessibility/tsconfig.json @@ -2,7 +2,12 @@ "extends": "../../build/tsconfig.common", "compilerOptions": { "composite": true, - "outDir": "dist/dts" + "outDir": "dist/dts", + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/accessibility": ["./src"] + } }, "include": ["src", "test"] } diff --git a/packages/react-bindings/test/accesibility/getKeyDownHandlers-test.ts b/packages/react-bindings/test/accesibility/getKeyDownHandlers-test.ts index cae9daa3ae..7d3fad2594 100644 --- a/packages/react-bindings/test/accesibility/getKeyDownHandlers-test.ts +++ b/packages/react-bindings/test/accesibility/getKeyDownHandlers-test.ts @@ -1,3 +1,4 @@ +// This is not exported import getKeyDownHandlers from '../../src/accessibility/getKeyDownHandlers' // @ts-ignore import * as keyboardKey from 'keyboard-key' diff --git a/packages/react-bindings/test/accesibility/shouldHandleOnKeys-test.ts b/packages/react-bindings/test/accesibility/shouldHandleOnKeys-test.ts index b7e5271025..6675416984 100644 --- a/packages/react-bindings/test/accesibility/shouldHandleOnKeys-test.ts +++ b/packages/react-bindings/test/accesibility/shouldHandleOnKeys-test.ts @@ -1,3 +1,4 @@ +// This is not exported import shouldHandleOnKeys from '../../src/accessibility/shouldHandleOnKeys' const getEventArg = ( diff --git a/packages/react-bindings/test/styles/resolveStylesAndClasses-test.ts b/packages/react-bindings/test/styles/resolveStylesAndClasses-test.ts index 71ea32fdbe..28f8fa1dc4 100644 --- a/packages/react-bindings/test/styles/resolveStylesAndClasses-test.ts +++ b/packages/react-bindings/test/styles/resolveStylesAndClasses-test.ts @@ -4,6 +4,7 @@ import { emptyTheme, ICSSInJSStyle, } from '@fluentui/styles' +// This is not exported import resolveStylesAndClasses from '../../src/styles/resolveStylesAndClasses' const styleParam: ComponentStyleFunctionParam = { diff --git a/packages/react-bindings/tsconfig.json b/packages/react-bindings/tsconfig.json index fb067461e1..cd59832884 100644 --- a/packages/react-bindings/tsconfig.json +++ b/packages/react-bindings/tsconfig.json @@ -7,7 +7,12 @@ "noImplicitThis": true, "noImplicitAny": true, "noUnusedParameters": true, - "strictNullChecks": true + "strictNullChecks": true, + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/react-bindings": ["./src"] + } }, "include": ["src", "test"], "references": [ diff --git a/packages/react-component-event-listener/tsconfig.json b/packages/react-component-event-listener/tsconfig.json index 6908043d43..00be7b471d 100644 --- a/packages/react-component-event-listener/tsconfig.json +++ b/packages/react-component-event-listener/tsconfig.json @@ -7,7 +7,12 @@ "noImplicitThis": true, "noImplicitAny": true, "noUnusedParameters": true, - "strictNullChecks": true + "strictNullChecks": true, + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/react-component-event-listener": ["./src"] + } }, "include": ["src", "test"], "references": [] diff --git a/packages/react-component-nesting-registry/tsconfig.json b/packages/react-component-nesting-registry/tsconfig.json index 6908043d43..d7d79d34a2 100644 --- a/packages/react-component-nesting-registry/tsconfig.json +++ b/packages/react-component-nesting-registry/tsconfig.json @@ -7,7 +7,12 @@ "noImplicitThis": true, "noImplicitAny": true, "noUnusedParameters": true, - "strictNullChecks": true + "strictNullChecks": true, + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/react-component-nesting-registry": ["./src"] + } }, "include": ["src", "test"], "references": [] diff --git a/packages/react-component-ref/tsconfig.json b/packages/react-component-ref/tsconfig.json index 6908043d43..9479a40ce8 100644 --- a/packages/react-component-ref/tsconfig.json +++ b/packages/react-component-ref/tsconfig.json @@ -7,7 +7,12 @@ "noImplicitThis": true, "noImplicitAny": true, "noUnusedParameters": true, - "strictNullChecks": true + "strictNullChecks": true, + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/react-component-ref": ["./src"] + } }, "include": ["src", "test"], "references": [] diff --git a/packages/react-proptypes/tsconfig.json b/packages/react-proptypes/tsconfig.json index 0af30c77d0..b3a5c418a4 100644 --- a/packages/react-proptypes/tsconfig.json +++ b/packages/react-proptypes/tsconfig.json @@ -2,7 +2,12 @@ "extends": "../../build/tsconfig.common", "compilerOptions": { "composite": true, - "outDir": "dist/dts" + "outDir": "dist/dts", + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/react-proptypes": ["./src"] + } }, "include": ["src", "test"], "references": [] diff --git a/packages/react-theming/tsconfig.json b/packages/react-theming/tsconfig.json index f6fe773b0e..3aa6e08776 100644 --- a/packages/react-theming/tsconfig.json +++ b/packages/react-theming/tsconfig.json @@ -3,7 +3,12 @@ "compilerOptions": { "composite": true, "rootDir": "src", - "outDir": "lib" + "outDir": "lib", + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/react-theming": ["./src"] + } }, "include": ["src"] } diff --git a/packages/react/jest.config.js b/packages/react/jest.config.js index 2c90a62efe..635d7fbbad 100644 --- a/packages/react/jest.config.js +++ b/packages/react/jest.config.js @@ -3,12 +3,5 @@ const commonConfig = require('@fluentui/internal-tooling/jest') module.exports = { ...commonConfig, name: 'react', - moduleNameMapper: { - ...require('lerna-alias').jest(), - 'docs/(.*)$': `/../../docs/$1`, - - // Legacy aliases, they should not be used in new tests - '^src/(.*)$': `/src/$1`, - 'test/(.*)$': `/test/$1`, - }, + moduleNameMapper: require('lerna-alias').jest(), } diff --git a/packages/react/test/specs/commonTests/handlesAccessibility.tsx b/packages/react/test/specs/commonTests/handlesAccessibility.tsx index 15efdbc7d0..83c5860df0 100644 --- a/packages/react/test/specs/commonTests/handlesAccessibility.tsx +++ b/packages/react/test/specs/commonTests/handlesAccessibility.tsx @@ -8,8 +8,8 @@ import { FocusZone, FOCUSZONE_WRAP_ATTRIBUTE } from '@fluentui/react-bindings' import * as React from 'react' import * as keyboardKey from 'keyboard-key' -import { mountWithProviderAndGetComponent, mountWithProvider } from 'test/utils' -import { UIComponent } from 'src/utils' +import { mountWithProviderAndGetComponent, mountWithProvider } from '../../utils' +import { UIComponent } from '@fluentui/react' import { EVENT_TARGET_ATTRIBUTE, getEventTargetComponent } from './eventTarget' export const getRenderedAttribute = (renderedComponent, propName, partSelector) => { diff --git a/packages/react/test/specs/commonTests/htmlIsAccessibilityCompliant.ts b/packages/react/test/specs/commonTests/htmlIsAccessibilityCompliant.ts index b4723cda56..aba67b090d 100644 --- a/packages/react/test/specs/commonTests/htmlIsAccessibilityCompliant.ts +++ b/packages/react/test/specs/commonTests/htmlIsAccessibilityCompliant.ts @@ -1,7 +1,7 @@ import * as React from 'react' import * as ReactDOMServer from 'react-dom/server' import { axe, toHaveNoViolations } from 'jest-axe' -import { EmptyThemeProvider } from 'test/utils' +import { EmptyThemeProvider } from '../../utils' type AxeMatcher = jest.Matchers & { toHaveNoViolations: () => R diff --git a/packages/react/test/specs/commonTests/implementsCollectionShorthandProp.tsx b/packages/react/test/specs/commonTests/implementsCollectionShorthandProp.tsx index 62c3014303..7ebe67fefd 100644 --- a/packages/react/test/specs/commonTests/implementsCollectionShorthandProp.tsx +++ b/packages/react/test/specs/commonTests/implementsCollectionShorthandProp.tsx @@ -1,7 +1,7 @@ import * as React from 'react' -import { mountWithProvider as mount } from 'test/utils' +import { mountWithProvider as mount } from '../../utils' import * as _ from 'lodash' -import { PropsOf } from 'src/types' +import { PropsOf } from '@fluentui/react' export type CollectionShorthandTestOptions = { mapsValueToProp: keyof (TProps & React.HTMLProps) | false diff --git a/packages/react/test/specs/commonTests/implementsShorthandProp.tsx b/packages/react/test/specs/commonTests/implementsShorthandProp.tsx index a52cfd9f91..b8e001acf7 100644 --- a/packages/react/test/specs/commonTests/implementsShorthandProp.tsx +++ b/packages/react/test/specs/commonTests/implementsShorthandProp.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { ReactWrapper } from 'enzyme' -import { mountWithProvider } from 'test/utils' -import { Props, PropsOf, InstanceOf } from 'src/types' +import { mountWithProvider } from '../../utils' +import { Props, PropsOf, InstanceOf } from '@fluentui/react' export type ShorthandTestOptions = { mapsValueToProp: keyof (TProps & React.HTMLProps) | false diff --git a/packages/react/test/specs/commonTests/implementsWrapperProp.tsx b/packages/react/test/specs/commonTests/implementsWrapperProp.tsx index 940891fa4a..dc23042535 100644 --- a/packages/react/test/specs/commonTests/implementsWrapperProp.tsx +++ b/packages/react/test/specs/commonTests/implementsWrapperProp.tsx @@ -1,9 +1,8 @@ import * as React from 'react' import { ReactWrapper } from 'enzyme' -import { mountWithProvider as mount } from 'test/utils' +import { mountWithProvider as mount } from '../../utils' -import Box from 'src/components/Box/Box' -import { Props, ShorthandValue } from 'src/types' +import { Box, Props, ShorthandValue } from '@fluentui/react' export interface ImplementsWrapperPropOptions { wrapppedComponentSelector: any diff --git a/packages/react/test/specs/commonTests/isConformant.tsx b/packages/react/test/specs/commonTests/isConformant.tsx index 2e3c9ea314..9fa836aeee 100644 --- a/packages/react/test/specs/commonTests/isConformant.tsx +++ b/packages/react/test/specs/commonTests/isConformant.tsx @@ -14,10 +14,10 @@ import { getDisplayName, mountWithProvider as mount, syntheticEvent, -} from 'test/utils' +} from '../../utils' import helpers from './commonHelpers' -import * as FluentUI from 'src/index' +import * as FluentUI from '@fluentui/react' import { getEventTargetComponent, EVENT_TARGET_ATTRIBUTE } from './eventTarget' export interface Conformant { @@ -112,7 +112,8 @@ export default function isConformant( // This is pretty ugly because: // - jest doesn't support custom error messages // - jest will run all test - const infoJSONPath = `docs/src/componentInfo/${constructorName}.info.json` + // TODO (@ecraig12345) - remove relative docs import + const infoJSONPath = `../../../../../docs/src/componentInfo/${constructorName}.info.json` let info @@ -124,7 +125,7 @@ export default function isConformant( throw new Error( [ '!! ==========================================================', - `!! Missing ${infoJSONPath}.`, + `!! Missing ${infoJSONPath.replace('../../../../../', '')}.`, '!! Run `yarn test` or `yarn test:watch` again to generate one.', '!! ==========================================================', ].join('\n'), diff --git a/packages/react/test/specs/commonTests/isExportedAtTopLevel.tsx b/packages/react/test/specs/commonTests/isExportedAtTopLevel.tsx index c70e1b5206..20e26e17b0 100644 --- a/packages/react/test/specs/commonTests/isExportedAtTopLevel.tsx +++ b/packages/react/test/specs/commonTests/isExportedAtTopLevel.tsx @@ -1,5 +1,5 @@ import * as _ from 'lodash' -import * as FluentUI from 'src/index' +import * as FluentUI from '@fluentui/react' // ---------------------------------------- // Is exported or private @@ -12,7 +12,7 @@ export default (constructorName: string, displayName: string) => { test('is exported at the top level', () => { const message = [ `'${displayName}' must be exported at top level.`, - "Export it in 'src/index.js'.", + "Export it in 'src/index.ts'.", ].join(' ') expect({ isTopLevelAPIProp, message }).toEqual({ diff --git a/packages/react/test/specs/commonTests/stylesFunction-test.tsx b/packages/react/test/specs/commonTests/stylesFunction-test.tsx index d7a484066e..fb3c6d6692 100644 --- a/packages/react/test/specs/commonTests/stylesFunction-test.tsx +++ b/packages/react/test/specs/commonTests/stylesFunction-test.tsx @@ -2,8 +2,8 @@ import { Extendable, ICSSInJSStyle } from '@fluentui/styles' import * as React from 'react' import * as PropTypes from 'prop-types' import * as _ from 'lodash' -import { UIComponent } from 'src/utils' -import { mountWithProviderAndGetComponent } from 'test/utils' +import { UIComponent } from '@fluentui/react' +import { mountWithProviderAndGetComponent } from '../../utils' type AttrValue = 'props' | 'state' diff --git a/packages/react/test/specs/components/Accordion/Accordion-test.tsx b/packages/react/test/specs/components/Accordion/Accordion-test.tsx index 1c376eeb2d..f80adff5df 100644 --- a/packages/react/test/specs/components/Accordion/Accordion-test.tsx +++ b/packages/react/test/specs/components/Accordion/Accordion-test.tsx @@ -1,10 +1,9 @@ import * as React from 'react' import * as keyboardKey from 'keyboard-key' -import Accordion from 'src/components/Accordion/Accordion' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' -import { mountWithProvider, mountWithProviderAndGetComponent } from 'test/utils' -import AccordionTitle from 'src/components/Accordion/AccordionTitle' +import { Accordion, AccordionTitle } from '@fluentui/react' +import { isConformant, handlesAccessibility } from '../../commonTests' +import { mountWithProvider, mountWithProviderAndGetComponent } from '../../../utils' import { ReactWrapper, CommonWrapper } from 'enzyme' const panels = [ diff --git a/packages/react/test/specs/components/Accordion/AccordionContent-test.tsx b/packages/react/test/specs/components/Accordion/AccordionContent-test.tsx index 210694ff32..6045e82220 100644 --- a/packages/react/test/specs/components/Accordion/AccordionContent-test.tsx +++ b/packages/react/test/specs/components/Accordion/AccordionContent-test.tsx @@ -1,8 +1,8 @@ import * as React from 'react' -import AccordionContent from 'src/components/Accordion/AccordionContent' -import { isConformant, handlesAccessibility, getRenderedAttribute } from 'test/specs/commonTests' -import { mountWithProviderAndGetComponent } from 'test/utils' +import { AccordionContent } from '@fluentui/react' +import { isConformant, handlesAccessibility, getRenderedAttribute } from '../../commonTests' +import { mountWithProviderAndGetComponent } from '../../../utils' describe('AccordionContent', () => { isConformant(AccordionContent) diff --git a/packages/react/test/specs/components/Accordion/AccordionTitle-test.tsx b/packages/react/test/specs/components/Accordion/AccordionTitle-test.tsx index 1f790fc0df..0c4c9c2a59 100644 --- a/packages/react/test/specs/components/Accordion/AccordionTitle-test.tsx +++ b/packages/react/test/specs/components/Accordion/AccordionTitle-test.tsx @@ -1,5 +1,5 @@ -import AccordionTitle from 'src/components/Accordion/AccordionTitle' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' +import { AccordionTitle } from '@fluentui/react' +import { isConformant, handlesAccessibility } from '../../commonTests' describe('AccordionTitle', () => { isConformant(AccordionTitle, { diff --git a/packages/react/test/specs/components/Alert/Alert-test.tsx b/packages/react/test/specs/components/Alert/Alert-test.tsx index 19385e6fce..18fe1b90cd 100644 --- a/packages/react/test/specs/components/Alert/Alert-test.tsx +++ b/packages/react/test/specs/components/Alert/Alert-test.tsx @@ -5,11 +5,9 @@ import { implementsShorthandProp, handlesAccessibility, htmlIsAccessibilityCompliant, -} from 'test/specs/commonTests' +} from '../../commonTests' -import Alert from 'src/components/Alert/Alert' -import Box from 'src/components/Box/Box' -import Button from 'src/components/Button/Button' +import { Alert, Box, Button } from '@fluentui/react' const alertImplementsShorthandProp = implementsShorthandProp(Alert) diff --git a/packages/react/test/specs/components/Animation/Animation-test.tsx b/packages/react/test/specs/components/Animation/Animation-test.tsx index 4933174e41..abc56c9f7f 100644 --- a/packages/react/test/specs/components/Animation/Animation-test.tsx +++ b/packages/react/test/specs/components/Animation/Animation-test.tsx @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Animation from 'src/components/Animation/Animation' +import { Animation } from '@fluentui/react' describe('Animation', () => { isConformant(Animation, { hasAccessibilityProp: false }) diff --git a/packages/react/test/specs/components/Attachment/Attachment-test.tsx b/packages/react/test/specs/components/Attachment/Attachment-test.tsx index 3f683d3969..28dd539f44 100644 --- a/packages/react/test/specs/components/Attachment/Attachment-test.tsx +++ b/packages/react/test/specs/components/Attachment/Attachment-test.tsx @@ -1,12 +1,9 @@ import * as React from 'react' -import { isConformant, implementsShorthandProp, handlesAccessibility } from 'test/specs/commonTests' -import { mountWithProvider, findIntrinsicElement } from 'test/utils' +import { isConformant, implementsShorthandProp, handlesAccessibility } from '../../commonTests' +import { mountWithProvider, findIntrinsicElement } from '../../../utils' import * as keyboardKey from 'keyboard-key' -import Attachment from 'src/components/Attachment/Attachment' -import Text from 'src/components/Text/Text' -import Icon from 'src/components/Icon/Icon' -import Button from 'src/components/Button/Button' +import { Attachment, Text, Icon, Button } from '@fluentui/react' import { ReactWrapper } from 'enzyme' const attachmentImplementsShorthandProp = implementsShorthandProp(Attachment) diff --git a/packages/react/test/specs/components/Avatar/Avatar-test.tsx b/packages/react/test/specs/components/Avatar/Avatar-test.tsx index 2a38004fea..531bd53ca3 100644 --- a/packages/react/test/specs/components/Avatar/Avatar-test.tsx +++ b/packages/react/test/specs/components/Avatar/Avatar-test.tsx @@ -1,8 +1,6 @@ -import { implementsShorthandProp, isConformant } from 'test/specs/commonTests' +import { implementsShorthandProp, isConformant } from '../../commonTests' -import Avatar from 'src/components/Avatar/Avatar' -import Label from 'src/components/Label/Label' -import Image from 'src/components/Image/Image' +import { Avatar, Label, Image } from '@fluentui/react' const avatarImplementsShorthandProp = implementsShorthandProp(Avatar) const { getInitials } = (Avatar as any).defaultProps diff --git a/packages/react/test/specs/components/Button/Button-test.tsx b/packages/react/test/specs/components/Button/Button-test.tsx index 2d2809acc9..3e2930d46c 100644 --- a/packages/react/test/specs/components/Button/Button-test.tsx +++ b/packages/react/test/specs/components/Button/Button-test.tsx @@ -6,12 +6,11 @@ import { htmlIsAccessibilityCompliant, implementsShorthandProp, getRenderedAttribute, -} from 'test/specs/commonTests' -import { mountWithProvider, mountWithProviderAndGetComponent } from 'test/utils' +} from '../../commonTests' +import { mountWithProvider, mountWithProviderAndGetComponent } from '../../../utils' import { toggleButtonBehavior } from '@fluentui/accessibility' -import Button from 'src/components/Button/Button' -import Icon from 'src/components/Icon/Icon' +import { Button, Icon } from '@fluentui/react' const buttonImplementsShorthandProp = implementsShorthandProp(Button) diff --git a/packages/react/test/specs/components/Button/ButtonGroup-test.tsx b/packages/react/test/specs/components/Button/ButtonGroup-test.tsx index 46e1528c7a..8b91b0141a 100644 --- a/packages/react/test/specs/components/Button/ButtonGroup-test.tsx +++ b/packages/react/test/specs/components/Button/ButtonGroup-test.tsx @@ -1,7 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' -import ButtonGroup from 'src/components/Button/ButtonGroup' +import { isConformant } from '../../commonTests' +import { ButtonGroup, Button } from '@fluentui/react' import implementsCollectionShorthandProp from '../../commonTests/implementsCollectionShorthandProp' -import Button from 'src/components/Button/Button' const buttonGroupImplementsCollectionShorthandProp = implementsCollectionShorthandProp(ButtonGroup) diff --git a/packages/react/test/specs/components/Carousel/Carousel-test.tsx b/packages/react/test/specs/components/Carousel/Carousel-test.tsx index ad53567594..91971cafbc 100644 --- a/packages/react/test/specs/components/Carousel/Carousel-test.tsx +++ b/packages/react/test/specs/components/Carousel/Carousel-test.tsx @@ -1,13 +1,16 @@ import * as React from 'react' -import { isConformant } from 'test/specs/commonTests' -import Carousel, { CarouselProps } from 'src/components/Carousel/Carousel' -import CarouselItem from 'src/components/Carousel/CarouselItem' -import CarouselNavigation from 'src/components/Carousel/CarouselNavigation' -import CarouselNavigationItem from 'src/components/Carousel/CarouselNavigationItem' -import Text from 'src/components/Text/Text' +import { isConformant } from '../../commonTests' +import { + Carousel, + CarouselProps, + CarouselItem, + CarouselNavigation, + CarouselNavigationItem, + Text, +} from '@fluentui/react' import { ReactWrapper, CommonWrapper } from 'enzyme' -import { findIntrinsicElement, mountWithProvider } from 'test/utils' +import { findIntrinsicElement, mountWithProvider } from '../../../utils' const items = [ { diff --git a/packages/react/test/specs/components/Carousel/CarouselItem-test.tsx b/packages/react/test/specs/components/Carousel/CarouselItem-test.tsx index b939d32657..3bcc3655c4 100644 --- a/packages/react/test/specs/components/Carousel/CarouselItem-test.tsx +++ b/packages/react/test/specs/components/Carousel/CarouselItem-test.tsx @@ -1,9 +1,9 @@ import * as React from 'react' -import { isConformant } from 'test/specs/commonTests' -import CarouselItem, { CarouselItemProps } from 'src/components/Carousel/CarouselItem' +import { isConformant } from '../../commonTests' +import { CarouselItem, CarouselItemProps } from '@fluentui/react' import { ReactWrapper, CommonWrapper } from 'enzyme' -import { findIntrinsicElement, mountWithProvider } from 'test/utils' +import { findIntrinsicElement, mountWithProvider } from '../../../utils' function renderCarouselItem(props?: CarouselItemProps): ReactWrapper { return mountWithProvider() diff --git a/packages/react/test/specs/components/Carousel/CarouselNavigation-test.tsx b/packages/react/test/specs/components/Carousel/CarouselNavigation-test.tsx index 2c679c1175..e9cb62ebf8 100644 --- a/packages/react/test/specs/components/Carousel/CarouselNavigation-test.tsx +++ b/packages/react/test/specs/components/Carousel/CarouselNavigation-test.tsx @@ -1,5 +1,5 @@ -import { isConformant } from 'test/specs/commonTests' -import CarouselNavigation from 'src/components/Carousel/CarouselNavigation' +import { isConformant } from '../../commonTests' +import { CarouselNavigation } from '@fluentui/react' describe('CarouselNavigation', () => { isConformant(CarouselNavigation) diff --git a/packages/react/test/specs/components/Carousel/CarouselNavigationItem-test.tsx b/packages/react/test/specs/components/Carousel/CarouselNavigationItem-test.tsx index ec3c893555..5402e51e65 100644 --- a/packages/react/test/specs/components/Carousel/CarouselNavigationItem-test.tsx +++ b/packages/react/test/specs/components/Carousel/CarouselNavigationItem-test.tsx @@ -1,5 +1,5 @@ -import { isConformant } from 'test/specs/commonTests' -import CarouselNavigationItem from 'src/components/Carousel/CarouselNavigationItem' +import { isConformant } from '../../commonTests' +import { CarouselNavigationItem } from '@fluentui/react' describe('CarouselNavigationItem', () => { isConformant(CarouselNavigationItem) diff --git a/packages/react/test/specs/components/Chat/Chat-test.ts b/packages/react/test/specs/components/Chat/Chat-test.ts index 0dfbbf1939..b8f9c35af6 100644 --- a/packages/react/test/specs/components/Chat/Chat-test.ts +++ b/packages/react/test/specs/components/Chat/Chat-test.ts @@ -1,9 +1,8 @@ import { chatBehavior, AccessibilityDefinition } from '@fluentui/accessibility' -import { handlesAccessibility, isConformant } from 'test/specs/commonTests' +import { handlesAccessibility, isConformant } from '../../commonTests' -import Chat from 'src/components/Chat/Chat' +import { Chat, ChatItem } from '@fluentui/react' import implementsCollectionShorthandProp from '../../commonTests/implementsCollectionShorthandProp' -import ChatItem from 'src/components/Chat/ChatItem' const chatImplementsCollectionShorthandProp = implementsCollectionShorthandProp(Chat) diff --git a/packages/react/test/specs/components/Chat/ChatItem-test.tsx b/packages/react/test/specs/components/Chat/ChatItem-test.tsx index 43d5bcc799..dafe6abf5b 100644 --- a/packages/react/test/specs/components/Chat/ChatItem-test.tsx +++ b/packages/react/test/specs/components/Chat/ChatItem-test.tsx @@ -1,6 +1,5 @@ -import { isConformant, implementsShorthandProp } from 'test/specs/commonTests' -import ChatItem from 'src/components/Chat/ChatItem' -import Box from 'src/components/Box/Box' +import { isConformant, implementsShorthandProp } from '../../commonTests' +import { ChatItem, Box } from '@fluentui/react' const chatItemImplementsShorthandProp = implementsShorthandProp(ChatItem) diff --git a/packages/react/test/specs/components/Chat/ChatMessage-test.tsx b/packages/react/test/specs/components/Chat/ChatMessage-test.tsx index af2838d2f6..675ee125f1 100644 --- a/packages/react/test/specs/components/Chat/ChatMessage-test.tsx +++ b/packages/react/test/specs/components/Chat/ChatMessage-test.tsx @@ -1,12 +1,10 @@ import { chatMessageBehavior, AccessibilityDefinition } from '@fluentui/accessibility' import * as React from 'react' -import { handlesAccessibility, implementsShorthandProp, isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { handlesAccessibility, implementsShorthandProp, isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' -import ChatMessage from 'src/components/Chat/ChatMessage' -import Text from 'src/components/Text/Text' -import Box from 'src/components/Box/Box' +import { ChatMessage, Text, Box } from '@fluentui/react' const chatMessageImplementsShorthandProp = implementsShorthandProp(ChatMessage) diff --git a/packages/react/test/specs/components/Checkbox/Checkbox-test.tsx b/packages/react/test/specs/components/Checkbox/Checkbox-test.tsx index 1a626d30a1..762482b25c 100644 --- a/packages/react/test/specs/components/Checkbox/Checkbox-test.tsx +++ b/packages/react/test/specs/components/Checkbox/Checkbox-test.tsx @@ -1,10 +1,6 @@ import * as React from 'react' -import Checkbox from 'src/components/Checkbox/Checkbox' -import { - isConformant, - handlesAccessibility, - htmlIsAccessibilityCompliant, -} from 'test/specs/commonTests' +import { Checkbox } from '@fluentui/react' +import { isConformant, handlesAccessibility, htmlIsAccessibilityCompliant } from '../../commonTests' describe('Checkbox', () => { isConformant(Checkbox) diff --git a/packages/react/test/specs/components/Debug/utils-test.ts b/packages/react/test/specs/components/Debug/utils-test.ts index 735f935c5b..fe1eccc4d5 100644 --- a/packages/react/test/specs/components/Debug/utils-test.ts +++ b/packages/react/test/specs/components/Debug/utils-test.ts @@ -1,4 +1,11 @@ -import { find, isOverridden, filter, getValues, removeNulls } from 'src/components/Debug/utils' +// These are not exported +import { + find, + isOverridden, + filter, + getValues, + removeNulls, +} from '../../../../src/components/Debug/utils' describe('debugUtils', () => { describe('find', () => { diff --git a/packages/react/test/specs/components/Dialog/Dialog-test.tsx b/packages/react/test/specs/components/Dialog/Dialog-test.tsx index 2b1c7dfdf6..5bce65626e 100644 --- a/packages/react/test/specs/components/Dialog/Dialog-test.tsx +++ b/packages/react/test/specs/components/Dialog/Dialog-test.tsx @@ -1,8 +1,7 @@ import * as React from 'react' -import Dialog from 'src/components/Dialog/Dialog' -import Button from 'src/components/Button/Button' -import { mountWithProvider, findIntrinsicElement } from 'test/utils' +import { Dialog, Button } from '@fluentui/react' +import { mountWithProvider, findIntrinsicElement } from '../../../utils' describe('Dialog', () => { describe('content', () => { diff --git a/packages/react/test/specs/components/Dialog/DialogFooter-test.tsx b/packages/react/test/specs/components/Dialog/DialogFooter-test.tsx index 5ba446b2b5..e5b5893b37 100644 --- a/packages/react/test/specs/components/Dialog/DialogFooter-test.tsx +++ b/packages/react/test/specs/components/Dialog/DialogFooter-test.tsx @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import DialogFooter from 'src/components/Dialog/DialogFooter' +import { DialogFooter } from '@fluentui/react' describe('DialogFooter', () => { isConformant(DialogFooter) diff --git a/packages/react/test/specs/components/Divider/Divider-test.tsx b/packages/react/test/specs/components/Divider/Divider-test.tsx index c316ab8f93..ef9e4c8b92 100644 --- a/packages/react/test/specs/components/Divider/Divider-test.tsx +++ b/packages/react/test/specs/components/Divider/Divider-test.tsx @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Divider from 'src/components/Divider/Divider' +import { Divider } from '@fluentui/react' describe('Divider', () => { isConformant(Divider) diff --git a/packages/react/test/specs/components/Dropdown/Dropdown-test.tsx b/packages/react/test/specs/components/Dropdown/Dropdown-test.tsx index e182f6f4bc..6a428bd0be 100644 --- a/packages/react/test/specs/components/Dropdown/Dropdown-test.tsx +++ b/packages/react/test/specs/components/Dropdown/Dropdown-test.tsx @@ -2,14 +2,16 @@ import * as React from 'react' import * as keyboardKey from 'keyboard-key' import * as _ from 'lodash' -import Dropdown from 'src/components/Dropdown/Dropdown' -import DropdownSearchInput from 'src/components/Dropdown/DropdownSearchInput' -import DropdownSelectedItem from 'src/components/Dropdown/DropdownSelectedItem' -import { isConformant } from 'test/specs/commonTests' -import { findIntrinsicElement, mountWithProvider } from 'test/utils' +import { + Dropdown, + DropdownSearchInput, + DropdownItemProps, + DropdownSelectedItem, + ShorthandValue, +} from '@fluentui/react' +import { isConformant } from '../../commonTests' +import { findIntrinsicElement, mountWithProvider } from '../../../utils' import { ReactWrapper, CommonWrapper } from 'enzyme' -import { DropdownItemProps } from 'src/components/Dropdown/DropdownItem' -import { ShorthandValue } from 'src/types' jest.dontMock('keyboard-key') jest.useFakeTimers() diff --git a/packages/react/test/specs/components/Dropdown/DropdownSelectedItem-test.tsx b/packages/react/test/specs/components/Dropdown/DropdownSelectedItem-test.tsx index 4a9e439ac8..4200290fb3 100644 --- a/packages/react/test/specs/components/Dropdown/DropdownSelectedItem-test.tsx +++ b/packages/react/test/specs/components/Dropdown/DropdownSelectedItem-test.tsx @@ -1,8 +1,8 @@ import * as React from 'react' -import DropdownSelectedItem from 'src/components/Dropdown/DropdownSelectedItem' -import { getRenderedAttribute } from 'test/specs/commonTests' -import { mountWithProviderAndGetComponent } from 'test/utils' +import { DropdownSelectedItem } from '@fluentui/react' +import { getRenderedAttribute } from '../../commonTests' +import { mountWithProviderAndGetComponent } from '../../../utils' describe('DropdownSelectedItem', () => { describe('active', () => { diff --git a/packages/react/test/specs/components/Embed/Embed-test.tsx b/packages/react/test/specs/components/Embed/Embed-test.tsx index ef270ac00a..47be902338 100644 --- a/packages/react/test/specs/components/Embed/Embed-test.tsx +++ b/packages/react/test/specs/components/Embed/Embed-test.tsx @@ -1,7 +1,7 @@ import * as React from 'react' -import Embed from 'src/components/Embed/Embed' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' -import { mountWithProviderAndGetComponent } from 'test/utils' +import { Embed } from '@fluentui/react' +import { isConformant, handlesAccessibility } from '../../commonTests' +import { mountWithProviderAndGetComponent } from '../../../utils' describe('Embed', () => { isConformant(Embed) diff --git a/packages/react/test/specs/components/Form/Form-test.tsx b/packages/react/test/specs/components/Form/Form-test.tsx index e3e5932d77..0e672d18f6 100644 --- a/packages/react/test/specs/components/Form/Form-test.tsx +++ b/packages/react/test/specs/components/Form/Form-test.tsx @@ -1,8 +1,7 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Form from 'src/components/Form/Form' +import { Form, FormField } from '@fluentui/react' import implementsCollectionShorthandProp from '../../commonTests/implementsCollectionShorthandProp' -import FormField from 'src/components/Form/FormField' const formImplementsCollectionShorthandProp = implementsCollectionShorthandProp(Form) diff --git a/packages/react/test/specs/components/Form/FormField-test.tsx b/packages/react/test/specs/components/Form/FormField-test.tsx index 3e8c6a4bc1..1b5ca65e93 100644 --- a/packages/react/test/specs/components/Form/FormField-test.tsx +++ b/packages/react/test/specs/components/Form/FormField-test.tsx @@ -1,13 +1,8 @@ import * as React from 'react' -import { isConformant, implementsShorthandProp } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' -import Button from 'src/components/Button/Button' -import RadioGroup from 'src/components/RadioGroup/RadioGroup' -import Input from 'src/components/Input/Input' -import Text from 'src/components/Text/Text' -import FormField from 'src/components/Form/FormField' -import Box from 'src/components/Box/Box' +import { isConformant, implementsShorthandProp } from '../../commonTests' +import { mountWithProvider } from '../../../utils' +import { Button, RadioGroup, Input, Text, FormField, Box } from '@fluentui/react' const formFieldImplementsShorthandProp = implementsShorthandProp(FormField) diff --git a/packages/react/test/specs/components/Grid/Grid-test.tsx b/packages/react/test/specs/components/Grid/Grid-test.tsx index 4bb4c17cd1..7ee9c3c50a 100644 --- a/packages/react/test/specs/components/Grid/Grid-test.tsx +++ b/packages/react/test/specs/components/Grid/Grid-test.tsx @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Grid from 'src/components/Grid/Grid' +import { Grid } from '@fluentui/react' describe('Grid', () => { isConformant(Grid) diff --git a/packages/react/test/specs/components/Header/Header-test.ts b/packages/react/test/specs/components/Header/Header-test.ts index 218027ce4c..ecab5dabd4 100644 --- a/packages/react/test/specs/components/Header/Header-test.ts +++ b/packages/react/test/specs/components/Header/Header-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Header from 'src/components/Header/Header' +import { Header } from '@fluentui/react' describe('Header', () => { isConformant(Header) diff --git a/packages/react/test/specs/components/Header/HeaderDescription-test.ts b/packages/react/test/specs/components/Header/HeaderDescription-test.ts index cf077c953a..bd9fae5e11 100644 --- a/packages/react/test/specs/components/Header/HeaderDescription-test.ts +++ b/packages/react/test/specs/components/Header/HeaderDescription-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import HeaderDescription from 'src/components/Header/HeaderDescription' +import { HeaderDescription } from '@fluentui/react' describe('HeaderDescription', () => { isConformant(HeaderDescription) diff --git a/packages/react/test/specs/components/HierarchicalTree/HierarchicalTree-test.tsx b/packages/react/test/specs/components/HierarchicalTree/HierarchicalTree-test.tsx index 334cd1d655..29ad288b5f 100644 --- a/packages/react/test/specs/components/HierarchicalTree/HierarchicalTree-test.tsx +++ b/packages/react/test/specs/components/HierarchicalTree/HierarchicalTree-test.tsx @@ -1,11 +1,9 @@ import * as React from 'react' import * as keyboardKey from 'keyboard-key' -import { isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' -import HierarchicalTree from 'src/components/HierarchicalTree/HierarchicalTree' -import HierarchicalTreeTitle from 'src/components/HierarchicalTree/HierarchicalTreeTitle' -import HierarchicalTreeItem from 'src/components/HierarchicalTree/HierarchicalTreeItem' +import { isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' +import { HierarchicalTree, HierarchicalTreeTitle, HierarchicalTreeItem } from '@fluentui/react' import { ReactWrapper, CommonWrapper } from 'enzyme' const items = [ diff --git a/packages/react/test/specs/components/Icon/Icon-test.tsx b/packages/react/test/specs/components/Icon/Icon-test.tsx index 942e25f904..c9dc87f501 100644 --- a/packages/react/test/specs/components/Icon/Icon-test.tsx +++ b/packages/react/test/specs/components/Icon/Icon-test.tsx @@ -2,8 +2,8 @@ import { ThemeInput } from '@fluentui/styles' import * as React from 'react' import { isConformant, handlesAccessibility, getRenderedAttribute } from '../../commonTests' -import Icon from '../../../../src/components/Icon/Icon' -import { mountWithProviderAndGetComponent } from 'test/utils' +import { Icon } from '@fluentui/react' +import { mountWithProviderAndGetComponent } from '../../../utils' describe('Icon', () => { isConformant(Icon, { requiredProps: { name: 'at' } }) diff --git a/packages/react/test/specs/components/Image/Image-test.tsx b/packages/react/test/specs/components/Image/Image-test.tsx index 6d8c7cd8fc..4c57b65f93 100644 --- a/packages/react/test/specs/components/Image/Image-test.tsx +++ b/packages/react/test/specs/components/Image/Image-test.tsx @@ -1,8 +1,8 @@ import * as React from 'react' -import { isConformant, handlesAccessibility, getRenderedAttribute } from 'test/specs/commonTests' +import { isConformant, handlesAccessibility, getRenderedAttribute } from '../../commonTests' -import Image from 'src/components/Image/Image' -import { mountWithProviderAndGetComponent } from 'test/utils' +import { Image } from '@fluentui/react' +import { mountWithProviderAndGetComponent } from '../../../utils' describe('Image', () => { isConformant(Image) diff --git a/packages/react/test/specs/components/Input/Input-test.tsx b/packages/react/test/specs/components/Input/Input-test.tsx index baa1d2f490..0972464ae8 100644 --- a/packages/react/test/specs/components/Input/Input-test.tsx +++ b/packages/react/test/specs/components/Input/Input-test.tsx @@ -3,16 +3,10 @@ import * as React from 'react' import * as keyboardKey from 'keyboard-key' import { ReactWrapper } from 'enzyme' -import { mountWithProvider as mount } from 'test/utils' -import { - isConformant, - implementsShorthandProp, - implementsWrapperProp, -} from 'test/specs/commonTests' - -import Input from 'src/components/Input/Input' -import Icon from 'src/components/Icon/Icon' -import Box from 'src/components/Box/Box' +import { mountWithProvider as mount } from '../../../utils' +import { isConformant, implementsShorthandProp, implementsWrapperProp } from '../../commonTests' + +import { Input, Icon, Box } from '@fluentui/react' const testValue = 'test value' const htmlInputAttrs = ['id', 'name', 'pattern', 'placeholder', 'type', 'value'] diff --git a/packages/react/test/specs/components/ItemLayout/ItemLayout-test.ts b/packages/react/test/specs/components/ItemLayout/ItemLayout-test.ts index 0500050d52..cb709c58d9 100644 --- a/packages/react/test/specs/components/ItemLayout/ItemLayout-test.ts +++ b/packages/react/test/specs/components/ItemLayout/ItemLayout-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import ItemLayout from 'src/components/ItemLayout/ItemLayout' +import { ItemLayout } from '@fluentui/react' describe('ItemLayout', () => { isConformant(ItemLayout, { hasAccessibilityProp: false }) diff --git a/packages/react/test/specs/components/Label/Label-test.tsx b/packages/react/test/specs/components/Label/Label-test.tsx index e6af7b2089..ac123e8f3a 100644 --- a/packages/react/test/specs/components/Label/Label-test.tsx +++ b/packages/react/test/specs/components/Label/Label-test.tsx @@ -1,8 +1,6 @@ -import { isConformant, implementsShorthandProp } from 'test/specs/commonTests' +import { isConformant, implementsShorthandProp } from '../../commonTests' -import Label from 'src/components/Label/Label' -import Icon from 'src/components/Icon/Icon' -import Image from 'src/components/Image/Image' +import { Label, Icon, Image } from '@fluentui/react' const labelImplementsShorthandProp = implementsShorthandProp(Label) diff --git a/packages/react/test/specs/components/Layout/Layout-test.ts b/packages/react/test/specs/components/Layout/Layout-test.ts index e35dfbfb04..f97c9a2ea2 100644 --- a/packages/react/test/specs/components/Layout/Layout-test.ts +++ b/packages/react/test/specs/components/Layout/Layout-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Layout from 'src/components/Layout/Layout' +import { Layout } from '@fluentui/react' describe('Layout', () => { isConformant(Layout, { hasAccessibilityProp: false }) diff --git a/packages/react/test/specs/components/List/List-test.tsx b/packages/react/test/specs/components/List/List-test.tsx index c4916f31b4..f47a0240b8 100644 --- a/packages/react/test/specs/components/List/List-test.tsx +++ b/packages/react/test/specs/components/List/List-test.tsx @@ -1,11 +1,10 @@ import * as React from 'react' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { isConformant, handlesAccessibility } from '../../commonTests' +import { mountWithProvider } from '../../../utils' -import List from 'src/components/List/List' +import { List, ListItem, ListItemProps } from '@fluentui/react' import implementsCollectionShorthandProp from '../../commonTests/implementsCollectionShorthandProp' -import ListItem, { ListItemProps } from 'src/components/List/ListItem' const listImplementsCollectionShorthandProp = implementsCollectionShorthandProp(List) diff --git a/packages/react/test/specs/components/List/ListItem-test.tsx b/packages/react/test/specs/components/List/ListItem-test.tsx index 3181238710..5ddee3c60c 100644 --- a/packages/react/test/specs/components/List/ListItem-test.tsx +++ b/packages/react/test/specs/components/List/ListItem-test.tsx @@ -1,10 +1,10 @@ import { selectableListItemBehavior } from '@fluentui/accessibility' import * as React from 'react' import * as keyboardKey from 'keyboard-key' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { isConformant, handlesAccessibility } from '../../commonTests' +import { mountWithProvider } from '../../../utils' -import ListItem from 'src/components/List/ListItem' +import { ListItem } from '@fluentui/react' describe('ListItem', () => { isConformant(ListItem) diff --git a/packages/react/test/specs/components/Loader/Loader-test.tsx b/packages/react/test/specs/components/Loader/Loader-test.tsx index ff6d3ba173..231d501689 100644 --- a/packages/react/test/specs/components/Loader/Loader-test.tsx +++ b/packages/react/test/specs/components/Loader/Loader-test.tsx @@ -1,8 +1,8 @@ import * as React from 'react' -import Loader from 'src/components/Loader/Loader' -import { isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { Loader } from '@fluentui/react' +import { isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' describe('Loader', () => { isConformant(Loader) diff --git a/packages/react/test/specs/components/Menu/Menu-test.tsx b/packages/react/test/specs/components/Menu/Menu-test.tsx index 57c254bf52..63123f03f2 100644 --- a/packages/react/test/specs/components/Menu/Menu-test.tsx +++ b/packages/react/test/specs/components/Menu/Menu-test.tsx @@ -1,10 +1,9 @@ import * as React from 'react' -import Menu from 'src/components/Menu/Menu' -import { isConformant, handlesAccessibility, getRenderedAttribute } from 'test/specs/commonTests' -import { mountWithProvider, mountWithProviderAndGetComponent } from 'test/utils' +import { Menu, MenuItem } from '@fluentui/react' +import { isConformant, handlesAccessibility, getRenderedAttribute } from '../../commonTests' +import { mountWithProvider, mountWithProviderAndGetComponent } from '../../../utils' import implementsCollectionShorthandProp from '../../commonTests/implementsCollectionShorthandProp' -import MenuItem from 'src/components/Menu/MenuItem' import { AccessibilityDefinition, menuBehavior, diff --git a/packages/react/test/specs/components/Menu/MenuDivider-test.ts b/packages/react/test/specs/components/Menu/MenuDivider-test.ts index 9a2d25e6ad..ca33373e79 100644 --- a/packages/react/test/specs/components/Menu/MenuDivider-test.ts +++ b/packages/react/test/specs/components/Menu/MenuDivider-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import MenuDivider from 'src/components/Menu/MenuDivider' +import { MenuDivider } from '@fluentui/react' describe('MenuDivider', () => { isConformant(MenuDivider) diff --git a/packages/react/test/specs/components/Menu/MenuItem-test.tsx b/packages/react/test/specs/components/Menu/MenuItem-test.tsx index f9947ee8b6..fe7e953f18 100644 --- a/packages/react/test/specs/components/Menu/MenuItem-test.tsx +++ b/packages/react/test/specs/components/Menu/MenuItem-test.tsx @@ -5,10 +5,9 @@ import { } from '@fluentui/accessibility' import * as React from 'react' -import { isConformant, handlesAccessibility, getRenderedAttribute } from 'test/specs/commonTests' -import { mountWithProviderAndGetComponent } from 'test/utils' -import MenuItem from 'src/components/Menu/MenuItem' -import Box from 'src/components/Box/Box' +import { isConformant, handlesAccessibility, getRenderedAttribute } from '../../commonTests' +import { mountWithProviderAndGetComponent } from '../../../utils' +import { MenuItem, Box } from '@fluentui/react' describe('MenuItem', () => { isConformant(MenuItem, { diff --git a/packages/react/test/specs/components/MenuButton/MenuButton-test.tsx b/packages/react/test/specs/components/MenuButton/MenuButton-test.tsx index 10d6be50ae..2c3015b320 100644 --- a/packages/react/test/specs/components/MenuButton/MenuButton-test.tsx +++ b/packages/react/test/specs/components/MenuButton/MenuButton-test.tsx @@ -1,7 +1,7 @@ import * as React from 'react' -import MenuButton from 'src/components/MenuButton/MenuButton' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' +import { MenuButton } from '@fluentui/react' +import { isConformant, handlesAccessibility } from '../../commonTests' import { mountWithProvider } from '../../../utils' const mockMenu = { items: ['1', '2', '3'] } diff --git a/packages/react/test/specs/components/Popup/Popup-test.tsx b/packages/react/test/specs/components/Popup/Popup-test.tsx index bc58a18e46..02a5e8cdd9 100644 --- a/packages/react/test/specs/components/Popup/Popup-test.tsx +++ b/packages/react/test/specs/components/Popup/Popup-test.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import * as ReactDOM from 'react-dom' import * as ReactTestUtils from 'react-dom/test-utils' -import Popup, { PopupEvents } from 'src/components/Popup/Popup' +import { Popup, PopupEvents } from '@fluentui/react' import { domEvent, EmptyThemeProvider, mountWithProvider } from '../../../utils' import * as keyboardKey from 'keyboard-key' import { ReactWrapper } from 'enzyme' diff --git a/packages/react/test/specs/components/Popup/PopupContent-test.ts b/packages/react/test/specs/components/Popup/PopupContent-test.ts index 992db9cccd..99248d85ac 100644 --- a/packages/react/test/specs/components/Popup/PopupContent-test.ts +++ b/packages/react/test/specs/components/Popup/PopupContent-test.ts @@ -1,5 +1,5 @@ -import { isConformant } from 'test/specs/commonTests' -import PopupContent from 'src/components/Popup/PopupContent' +import { isConformant } from '../../commonTests' +import { PopupContent } from '@fluentui/react' describe('PopupContent', () => { isConformant(PopupContent, { rendersPortal: true }) diff --git a/packages/react/test/specs/components/Portal/Portal-test.tsx b/packages/react/test/specs/components/Portal/Portal-test.tsx index 1a7752c32b..b572c552b9 100644 --- a/packages/react/test/specs/components/Portal/Portal-test.tsx +++ b/packages/react/test/specs/components/Portal/Portal-test.tsx @@ -1,8 +1,9 @@ import * as React from 'react' -import { domEvent, nextFrame, mountWithProvider } from 'test/utils' +import { domEvent, nextFrame, mountWithProvider } from '../../../utils' -import Portal from 'src/components/Portal/Portal' -import PortalInner from 'src/components/Portal/PortalInner' +import { Portal } from '@fluentui/react' +// This is not exported +import PortalInner from '../../../../src/components/Portal/PortalInner' describe('Portal', () => { const testPortalInnerIsOpen = (rootWrapper, visible: boolean) => { diff --git a/packages/react/test/specs/components/PortalInner/PortalInner-test.tsx b/packages/react/test/specs/components/PortalInner/PortalInner-test.tsx index 4a07e57831..dd08028e23 100644 --- a/packages/react/test/specs/components/PortalInner/PortalInner-test.tsx +++ b/packages/react/test/specs/components/PortalInner/PortalInner-test.tsx @@ -1,7 +1,8 @@ import * as React from 'react' -import PortalInner, { PortalInnerProps } from 'src/components/Portal/PortalInner' -import { mountWithProvider } from 'test/utils' +// These are not exported +import PortalInner, { PortalInnerProps } from '../../../../src/components/Portal/PortalInner' +import { mountWithProvider } from '../../../utils' const mountPortalInner = (props: PortalInnerProps) => mountWithProvider( diff --git a/packages/react/test/specs/components/Provider/Provider-test.tsx b/packages/react/test/specs/components/Provider/Provider-test.tsx index f6a3817919..b5a275bd0f 100644 --- a/packages/react/test/specs/components/Provider/Provider-test.tsx +++ b/packages/react/test/specs/components/Provider/Provider-test.tsx @@ -1,18 +1,12 @@ import { ThemeInput } from '@fluentui/styles' import { mount } from 'enzyme' -import { createRenderer } from 'src/utils/felaRenderer' import * as React from 'react' -import Provider from 'src/components/Provider/Provider' -import ProviderConsumer from 'src/components/Provider/ProviderConsumer' +import { Provider, ProviderConsumer, createRenderer } from '@fluentui/react' describe('Provider', () => { - test('is exported', () => { - expect(require('src/index.ts').Provider).toEqual(Provider) - }) - test('has a ProviderConsumer subcomponent', () => { - expect(require('src/index.ts').Provider.Consumer).toEqual(ProviderConsumer) + expect(Provider.Consumer).toEqual(ProviderConsumer) }) describe('overwrite', () => { diff --git a/packages/react/test/specs/components/Provider/ProviderConsumer-test.tsx b/packages/react/test/specs/components/Provider/ProviderConsumer-test.tsx index d7bdc708f9..061130dd3c 100644 --- a/packages/react/test/specs/components/Provider/ProviderConsumer-test.tsx +++ b/packages/react/test/specs/components/Provider/ProviderConsumer-test.tsx @@ -2,8 +2,7 @@ import { ComponentStyleFunctionParam, emptyTheme, ThemeInput } from '@fluentui/s import * as React from 'react' import { mount } from 'enzyme' -import Provider from 'src/components/Provider/Provider' -import ProviderConsumer from 'src/components/Provider/ProviderConsumer' +import { Provider, ProviderConsumer } from '@fluentui/react' const styleParam: ComponentStyleFunctionParam = { disableAnimations: false, @@ -15,10 +14,6 @@ const styleParam: ComponentStyleFunctionParam = { } describe('ProviderConsumer', () => { - test('is exported', () => { - expect(require('src/index.ts').ProviderConsumer).toEqual(ProviderConsumer) - }) - test('is a subcomponent of the Provider', () => { expect(Provider.Consumer).toEqual(ProviderConsumer) }) diff --git a/packages/react/test/specs/components/RadioGroup/RadioGroup-test.tsx b/packages/react/test/specs/components/RadioGroup/RadioGroup-test.tsx index b770259fa1..fcba613743 100644 --- a/packages/react/test/specs/components/RadioGroup/RadioGroup-test.tsx +++ b/packages/react/test/specs/components/RadioGroup/RadioGroup-test.tsx @@ -1,15 +1,10 @@ import * as React from 'react' -import { - isConformant, - handlesAccessibility, - htmlIsAccessibilityCompliant, -} from 'test/specs/commonTests' +import { isConformant, handlesAccessibility, htmlIsAccessibilityCompliant } from '../../commonTests' import implementsCollectionShorthandProp from '../../commonTests/implementsCollectionShorthandProp' -import { mountWithProvider } from 'test/utils' +import { mountWithProvider } from '../../../utils' -import RadioGroup from 'src/components/RadioGroup/RadioGroup' -import RadioGroupItem from 'src/components/RadioGroup/RadioGroupItem' +import { RadioGroup, RadioGroupItem } from '@fluentui/react' const radioGroupImplementsCollectionShorthandProp = implementsCollectionShorthandProp(RadioGroup) diff --git a/packages/react/test/specs/components/RadioGroup/RadioGroupItem-test.ts b/packages/react/test/specs/components/RadioGroup/RadioGroupItem-test.ts index bb2ee4a6f5..46be492510 100644 --- a/packages/react/test/specs/components/RadioGroup/RadioGroupItem-test.ts +++ b/packages/react/test/specs/components/RadioGroup/RadioGroupItem-test.ts @@ -1,6 +1,6 @@ -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' +import { isConformant, handlesAccessibility } from '../../commonTests' -import RadioGroupItem from 'src/components/RadioGroup/RadioGroupItem' +import { RadioGroupItem } from '@fluentui/react' describe('RadioGroupItem', () => { isConformant(RadioGroupItem) diff --git a/packages/react/test/specs/components/Reaction/Reaction-test.tsx b/packages/react/test/specs/components/Reaction/Reaction-test.tsx index 21c7b3e2a6..607cca5bf0 100644 --- a/packages/react/test/specs/components/Reaction/Reaction-test.tsx +++ b/packages/react/test/specs/components/Reaction/Reaction-test.tsx @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Reaction from 'src/components/Reaction/Reaction' +import { Reaction } from '@fluentui/react' describe('Reaction', () => { isConformant(Reaction) diff --git a/packages/react/test/specs/components/Reaction/ReactionGroup-test.tsx b/packages/react/test/specs/components/Reaction/ReactionGroup-test.tsx index e15a1883cc..26e618c58f 100644 --- a/packages/react/test/specs/components/Reaction/ReactionGroup-test.tsx +++ b/packages/react/test/specs/components/Reaction/ReactionGroup-test.tsx @@ -1,8 +1,7 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import ReactionGroup from 'src/components/Reaction/ReactionGroup' -import Reaction from 'src/components/Reaction/Reaction' -import implementsCollectionShorthandProp from 'test/specs/commonTests/implementsCollectionShorthandProp' +import { ReactionGroup, Reaction } from '@fluentui/react' +import implementsCollectionShorthandProp from '../../commonTests/implementsCollectionShorthandProp' const reactionGroupImplementsCollectionShorthandProp = implementsCollectionShorthandProp( ReactionGroup, diff --git a/packages/react/test/specs/components/Segment/Segment-test.ts b/packages/react/test/specs/components/Segment/Segment-test.ts index b69aff7639..47e8eef45b 100644 --- a/packages/react/test/specs/components/Segment/Segment-test.ts +++ b/packages/react/test/specs/components/Segment/Segment-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Segment from 'src/components/Segment/Segment' +import { Segment } from '@fluentui/react' describe('Segment', () => { isConformant(Segment) diff --git a/packages/react/test/specs/components/Slider/Slider-test.tsx b/packages/react/test/specs/components/Slider/Slider-test.tsx index af8f4ee925..8d9518ab71 100644 --- a/packages/react/test/specs/components/Slider/Slider-test.tsx +++ b/packages/react/test/specs/components/Slider/Slider-test.tsx @@ -1,5 +1,5 @@ -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' -import Slider from 'src/components/Slider/Slider' +import { isConformant, handlesAccessibility } from '../../commonTests' +import { Slider } from '@fluentui/react' describe('Slider', () => { isConformant(Slider, { diff --git a/packages/react/test/specs/components/SplitButton/SplitButton-test.tsx b/packages/react/test/specs/components/SplitButton/SplitButton-test.tsx index ff49d6bddd..93c148349f 100644 --- a/packages/react/test/specs/components/SplitButton/SplitButton-test.tsx +++ b/packages/react/test/specs/components/SplitButton/SplitButton-test.tsx @@ -1,13 +1,10 @@ import * as React from 'react' import * as keyboardKey from 'keyboard-key' -import SplitButton from 'src/components/SplitButton/SplitButton' -import { isConformant } from 'test/specs/commonTests' +import { SplitButton, Menu, MenuButton, Button } from '@fluentui/react' +import { isConformant } from '../../commonTests' import { ReactWrapper, CommonWrapper } from 'enzyme' import { mountWithProvider, findIntrinsicElement } from '../../../utils' -import Menu from 'src/components/Menu/Menu' -import MenuButton from 'src/components/MenuButton/MenuButton' -import Button from 'src/components/Button/Button' const mockMenu = { items: ['1', '2', '3'] } diff --git a/packages/react/test/specs/components/Status/Status-test.tsx b/packages/react/test/specs/components/Status/Status-test.tsx index 019bc0511e..e038bd2245 100644 --- a/packages/react/test/specs/components/Status/Status-test.tsx +++ b/packages/react/test/specs/components/Status/Status-test.tsx @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Status from 'src/components/Status/Status' +import { Status } from '@fluentui/react' describe('Status', () => { isConformant(Status) diff --git a/packages/react/test/specs/components/Table/Table-test.tsx b/packages/react/test/specs/components/Table/Table-test.tsx index 16e390cb9b..0dde41cca2 100644 --- a/packages/react/test/specs/components/Table/Table-test.tsx +++ b/packages/react/test/specs/components/Table/Table-test.tsx @@ -1,9 +1,7 @@ import * as React from 'react' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' -import { mountWithProviderAndGetComponent } from 'test/utils' -import TableRow from 'src/components/Table/TableRow' - -import Table from 'src/components/Table/Table' +import { isConformant, handlesAccessibility } from '../../commonTests' +import { mountWithProviderAndGetComponent } from '../../../utils' +import { TableRow, Table } from '@fluentui/react' describe('Table', () => { isConformant(Table) diff --git a/packages/react/test/specs/components/Table/TableCell-test.tsx b/packages/react/test/specs/components/Table/TableCell-test.tsx index 53f9a27d19..892377903f 100644 --- a/packages/react/test/specs/components/Table/TableCell-test.tsx +++ b/packages/react/test/specs/components/Table/TableCell-test.tsx @@ -1,7 +1,7 @@ import * as React from 'react' -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' -import { mountWithProviderAndGetComponent } from 'test/utils' -import TableCell from 'src/components/Table/TableCell' +import { isConformant, handlesAccessibility } from '../../commonTests' +import { mountWithProviderAndGetComponent } from '../../../utils' +import { TableCell } from '@fluentui/react' describe('TableCell', () => { isConformant(TableCell) diff --git a/packages/react/test/specs/components/Table/TableRow-test.tsx b/packages/react/test/specs/components/Table/TableRow-test.tsx index 9751e06103..26eac1a7e5 100644 --- a/packages/react/test/specs/components/Table/TableRow-test.tsx +++ b/packages/react/test/specs/components/Table/TableRow-test.tsx @@ -1,9 +1,7 @@ import * as React from 'react' -import { isConformant, handlesAccessibility, getRenderedAttribute } from 'test/specs/commonTests' -import { mountWithProviderAndGetComponent } from 'test/utils' -import TableCell from 'src/components/Table/TableCell' - -import TableRow from 'src/components/Table/TableRow' +import { isConformant, handlesAccessibility, getRenderedAttribute } from '../../commonTests' +import { mountWithProviderAndGetComponent } from '../../../utils' +import { TableCell, TableRow } from '@fluentui/react' describe('TableRow', () => { isConformant(TableRow) diff --git a/packages/react/test/specs/components/Text/Text-test.tsx b/packages/react/test/specs/components/Text/Text-test.tsx index e179ec4d2b..efe40230ab 100644 --- a/packages/react/test/specs/components/Text/Text-test.tsx +++ b/packages/react/test/specs/components/Text/Text-test.tsx @@ -1,9 +1,9 @@ import * as React from 'react' -import { isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' -import Text from 'src/components/Text/Text' +import { Text } from '@fluentui/react' describe('Text', () => { isConformant(Text) diff --git a/packages/react/test/specs/components/TextArea/TextArea-test.tsx b/packages/react/test/specs/components/TextArea/TextArea-test.tsx index 09b9e57713..baa616bbfb 100644 --- a/packages/react/test/specs/components/TextArea/TextArea-test.tsx +++ b/packages/react/test/specs/components/TextArea/TextArea-test.tsx @@ -1,7 +1,7 @@ import * as React from 'react' -import { mountWithProvider as mount } from 'test/utils' -import TextArea from 'src/components/TextArea/TextArea' -import { isConformant } from 'test/specs/commonTests' +import { mountWithProvider as mount } from '../../../utils' +import { TextArea } from '@fluentui/react' +import { isConformant } from '../../commonTests' import * as faker from 'faker' describe('TextArea', () => { diff --git a/packages/react/test/specs/components/Toolbar/Toolbar-test.tsx b/packages/react/test/specs/components/Toolbar/Toolbar-test.tsx index cc5f6290d9..1b7b881f0f 100644 --- a/packages/react/test/specs/components/Toolbar/Toolbar-test.tsx +++ b/packages/react/test/specs/components/Toolbar/Toolbar-test.tsx @@ -1,8 +1,8 @@ import * as React from 'react' -import Toolbar from 'src/components/Toolbar/Toolbar' +import { Toolbar } from '@fluentui/react' -import { isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' import { ReactWrapper } from 'enzyme' describe('Toolbar', () => { diff --git a/packages/react/test/specs/components/Toolbar/ToolbarCustomItem-test.ts b/packages/react/test/specs/components/Toolbar/ToolbarCustomItem-test.ts index dba74575cf..a5a5d845bc 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarCustomItem-test.ts +++ b/packages/react/test/specs/components/Toolbar/ToolbarCustomItem-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import ToolbarCustomItem from 'src/components/Toolbar/ToolbarCustomItem' +import { ToolbarCustomItem } from '@fluentui/react' describe('ToolbarCustomItem', () => { isConformant(ToolbarCustomItem, { diff --git a/packages/react/test/specs/components/Toolbar/ToolbarDivider-test.ts b/packages/react/test/specs/components/Toolbar/ToolbarDivider-test.ts index 41c32e772b..8d3f5a8628 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarDivider-test.ts +++ b/packages/react/test/specs/components/Toolbar/ToolbarDivider-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import ToolbarDivider from 'src/components/Toolbar/ToolbarDivider' +import { ToolbarDivider } from '@fluentui/react' describe('ToolbarDivider', () => { isConformant(ToolbarDivider) diff --git a/packages/react/test/specs/components/Toolbar/ToolbarItem-test.tsx b/packages/react/test/specs/components/Toolbar/ToolbarItem-test.tsx index 0feaebad5d..9ce21431ae 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarItem-test.tsx +++ b/packages/react/test/specs/components/Toolbar/ToolbarItem-test.tsx @@ -1,8 +1,8 @@ import * as React from 'react' -import ToolbarItem from 'src/components/Toolbar/ToolbarItem' +import { ToolbarItem } from '@fluentui/react' -import { isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' import { ReactWrapper } from 'enzyme' describe('ToolbarItem', () => { diff --git a/packages/react/test/specs/components/Toolbar/ToolbarMenu-test.tsx b/packages/react/test/specs/components/Toolbar/ToolbarMenu-test.tsx index 35d8d51e46..e24418cf91 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarMenu-test.tsx +++ b/packages/react/test/specs/components/Toolbar/ToolbarMenu-test.tsx @@ -1,8 +1,8 @@ import * as React from 'react' -import ToolbarMenu from 'src/components/Toolbar/ToolbarMenu' +import { ToolbarMenu } from '@fluentui/react' -import { isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' +import { isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' import { ReactWrapper } from 'enzyme' describe('ToolbarMenu', () => { diff --git a/packages/react/test/specs/components/Toolbar/ToolbarMenuDivider-test.ts b/packages/react/test/specs/components/Toolbar/ToolbarMenuDivider-test.ts index 317e522c50..0a12d86d90 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarMenuDivider-test.ts +++ b/packages/react/test/specs/components/Toolbar/ToolbarMenuDivider-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import ToolbarMenuDivider from 'src/components/Toolbar/ToolbarMenuDivider' +import { ToolbarMenuDivider } from '@fluentui/react' describe('ToolbarMenuDivider', () => { isConformant(ToolbarMenuDivider) diff --git a/packages/react/test/specs/components/Toolbar/ToolbarMenuItem-test.ts b/packages/react/test/specs/components/Toolbar/ToolbarMenuItem-test.ts index d76e516d80..8e386a89c6 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarMenuItem-test.ts +++ b/packages/react/test/specs/components/Toolbar/ToolbarMenuItem-test.ts @@ -1,7 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import ToolbarMenuItem from 'src/components/Toolbar/ToolbarMenuItem' -import Box from 'src/components/Box/Box' +import { ToolbarMenuItem, Box } from '@fluentui/react' describe('ToolbarMenuItem', () => { isConformant(ToolbarMenuItem, { diff --git a/packages/react/test/specs/components/Toolbar/ToolbarMenuRadioGroup-test.ts b/packages/react/test/specs/components/Toolbar/ToolbarMenuRadioGroup-test.ts index 7d9a1a5079..718d52b713 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarMenuRadioGroup-test.ts +++ b/packages/react/test/specs/components/Toolbar/ToolbarMenuRadioGroup-test.ts @@ -1,7 +1,6 @@ -import { handlesAccessibility, isConformant } from 'test/specs/commonTests' +import { handlesAccessibility, isConformant } from '../../commonTests' -import Box from 'src/components/Box/Box' -import ToolbarMenuRadioGroup from 'src/components/Toolbar/ToolbarMenuRadioGroup' +import { Box, ToolbarMenuRadioGroup } from '@fluentui/react' describe('ToolbarMenuRadioGroup', () => { isConformant(ToolbarMenuRadioGroup, { diff --git a/packages/react/test/specs/components/Toolbar/ToolbarRadioGroup-test.tsx b/packages/react/test/specs/components/Toolbar/ToolbarRadioGroup-test.tsx index 4fcb3695d3..b4475d5c6e 100644 --- a/packages/react/test/specs/components/Toolbar/ToolbarRadioGroup-test.tsx +++ b/packages/react/test/specs/components/Toolbar/ToolbarRadioGroup-test.tsx @@ -1,8 +1,8 @@ -import { isConformant, handlesAccessibility } from 'test/specs/commonTests' +import { isConformant, handlesAccessibility } from '../../commonTests' -import ToolbarRadioGroup from 'src/components/Toolbar/ToolbarRadioGroup' +import { ToolbarRadioGroup } from '@fluentui/react' import { ReactWrapper } from 'enzyme' -import { mountWithProvider } from 'test/utils' +import { mountWithProvider } from '../../../utils' import * as React from 'react' describe('ToolbarRadioGroup', () => { diff --git a/packages/react/test/specs/components/Tooltip/Tooltip-test.tsx b/packages/react/test/specs/components/Tooltip/Tooltip-test.tsx index d85f9d0be3..5ae6ae1684 100644 --- a/packages/react/test/specs/components/Tooltip/Tooltip-test.tsx +++ b/packages/react/test/specs/components/Tooltip/Tooltip-test.tsx @@ -1,7 +1,6 @@ import * as React from 'react' -import Tooltip from 'src/components/Tooltip/Tooltip' -import Button from 'src/components/Button/Button' +import { Tooltip, Button } from '@fluentui/react' import { mountWithProvider, findIntrinsicElement } from '../../../utils' diff --git a/packages/react/test/specs/components/Tooltip/TooltipContent-test.ts b/packages/react/test/specs/components/Tooltip/TooltipContent-test.ts index afeda10e6b..1e844e0c70 100644 --- a/packages/react/test/specs/components/Tooltip/TooltipContent-test.ts +++ b/packages/react/test/specs/components/Tooltip/TooltipContent-test.ts @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import TooltipContent from 'src/components/Tooltip/TooltipContent' +import { TooltipContent } from '@fluentui/react' describe('TooltipContent', () => { isConformant(TooltipContent) diff --git a/packages/react/test/specs/components/Tree/Tree-test.tsx b/packages/react/test/specs/components/Tree/Tree-test.tsx index 0d4f66bd4b..4366f58044 100644 --- a/packages/react/test/specs/components/Tree/Tree-test.tsx +++ b/packages/react/test/specs/components/Tree/Tree-test.tsx @@ -1,11 +1,9 @@ import * as React from 'react' import * as keyboardKey from 'keyboard-key' -import { isConformant } from 'test/specs/commonTests' -import { mountWithProvider } from 'test/utils' -import Tree from 'src/components/Tree/Tree' -import TreeTitle from 'src/components/Tree/TreeTitle' -import TreeItem from 'src/components/Tree/TreeItem' +import { isConformant } from '../../commonTests' +import { mountWithProvider } from '../../../utils' +import { Tree, TreeTitle, TreeItem } from '@fluentui/react' import { ReactWrapper, CommonWrapper } from 'enzyme' const items = [ diff --git a/packages/react/test/specs/components/Tree/TreeItem-test.tsx b/packages/react/test/specs/components/Tree/TreeItem-test.tsx index 50198c24d2..cbd19f41c4 100644 --- a/packages/react/test/specs/components/Tree/TreeItem-test.tsx +++ b/packages/react/test/specs/components/Tree/TreeItem-test.tsx @@ -1,5 +1,5 @@ -import { isConformant } from 'test/specs/commonTests' -import TreeItem from 'src/components/Tree/TreeItem' +import { isConformant } from '../../commonTests' +import { TreeItem } from '@fluentui/react' describe('TreeItem', () => { isConformant(TreeItem, { requiredProps: { id: 'my-id' } }) diff --git a/packages/react/test/specs/components/Tree/TreeTitle-test.tsx b/packages/react/test/specs/components/Tree/TreeTitle-test.tsx index 529d494e4b..1066db7d23 100644 --- a/packages/react/test/specs/components/Tree/TreeTitle-test.tsx +++ b/packages/react/test/specs/components/Tree/TreeTitle-test.tsx @@ -1,5 +1,5 @@ -import { isConformant } from 'test/specs/commonTests' -import TreeTitle from 'src/components/Tree/TreeTitle' +import { isConformant } from '../../commonTests' +import { TreeTitle } from '@fluentui/react' describe('TreeTitle', () => { isConformant(TreeTitle) diff --git a/packages/react/test/specs/components/Video/Video-test.tsx b/packages/react/test/specs/components/Video/Video-test.tsx index 8ba619ae7e..d7b4cd431c 100644 --- a/packages/react/test/specs/components/Video/Video-test.tsx +++ b/packages/react/test/specs/components/Video/Video-test.tsx @@ -1,6 +1,6 @@ -import { isConformant } from 'test/specs/commonTests' +import { isConformant } from '../../commonTests' -import Video from 'src/components/Video/Video' +import { Video } from '@fluentui/react' describe('Video', () => { isConformant(Video) diff --git a/packages/react/test/specs/themes/colorUtils-test.ts b/packages/react/test/specs/themes/colorUtils-test.ts index 58d7fa69fc..21225cbf45 100644 --- a/packages/react/test/specs/themes/colorUtils-test.ts +++ b/packages/react/test/specs/themes/colorUtils-test.ts @@ -1,5 +1,9 @@ -import { extendColorScheme, pickValuesFromColorScheme } from 'src/themes/colorUtils' -import { ColorSchemeMapping, ComponentAreaName } from 'src/themes/types' +import { + extendColorScheme, + pickValuesFromColorScheme, + ColorSchemeMapping, + ComponentAreaName, +} from '@fluentui/react' const generateColorSchemeValues = color => ({ foreground: color, diff --git a/packages/react/test/specs/themes/teams/components/Icon/Icon-test.tsx b/packages/react/test/specs/themes/teams/components/Icon/Icon-test.tsx index edce6e200f..23bfd73cc7 100644 --- a/packages/react/test/specs/themes/teams/components/Icon/Icon-test.tsx +++ b/packages/react/test/specs/themes/teams/components/Icon/Icon-test.tsx @@ -2,6 +2,7 @@ import * as _ from 'lodash' import * as React from 'react' import { shallow } from 'enzyme' +// These are not exported import icons, { teamsIconClassNames } from '../../../../../../src/themes/teams/components/Icon/svg' import processedIcons from '../../../../../../src/themes/teams/components/Icon/svg/processedIndex' import { SvgIconSpecWithStyles } from '../../../../../../src/themes/teams/components/Icon/svg/types' diff --git a/packages/react/test/specs/utils/AutoControlledComponent-test.tsx b/packages/react/test/specs/utils/AutoControlledComponent-test.tsx index 45c52dfcbb..c9d7f8e347 100644 --- a/packages/react/test/specs/utils/AutoControlledComponent-test.tsx +++ b/packages/react/test/specs/utils/AutoControlledComponent-test.tsx @@ -1,9 +1,8 @@ import * as _ from 'lodash' import * as React from 'react' import { shallow, ShallowWrapper } from 'enzyme' -import { AutoControlledComponent } from 'src/utils' -import { consoleUtil } from 'test/utils' -import { Props } from 'src/types' +import { AutoControlledComponent, Props } from '@fluentui/react' +import { consoleUtil } from '../../utils' let TestClass diff --git a/packages/react/test/specs/utils/accessibility/FocusContainer-test.ts b/packages/react/test/specs/utils/accessibility/FocusContainer-test.ts index 2a3e0503a6..f8951bd10b 100644 --- a/packages/react/test/specs/utils/accessibility/FocusContainer-test.ts +++ b/packages/react/test/specs/utils/accessibility/FocusContainer-test.ts @@ -1,4 +1,5 @@ -import { ContainerFocusHandler } from 'src/utils/accessibility/FocusHandling/FocusContainer' +// This is not exported +import { ContainerFocusHandler } from '../../../../src/utils/accessibility/FocusHandling/FocusContainer' const createFocusContainer = ( { itemsCount, setFocusAtFn }: { itemsCount: number; setFocusAtFn?: () => void } = { diff --git a/packages/react/test/specs/utils/childrenExist-test.tsx b/packages/react/test/specs/utils/childrenExist-test.tsx index 63fcfe9f94..fb015e1011 100644 --- a/packages/react/test/specs/utils/childrenExist-test.tsx +++ b/packages/react/test/specs/utils/childrenExist-test.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import childrenExist from 'src/utils/childrenExist' +import { childrenExist } from '@fluentui/react' describe('childrenExist', () => { test('returns false when no children are passed', () => { diff --git a/packages/react/test/specs/utils/createComponent-test.tsx b/packages/react/test/specs/utils/createComponent-test.tsx index 33c19c6eae..cb864b98b6 100644 --- a/packages/react/test/specs/utils/createComponent-test.tsx +++ b/packages/react/test/specs/utils/createComponent-test.tsx @@ -1,6 +1,6 @@ import * as React from 'react' -import { createComponent } from 'src/utils' +import { createComponent } from '@fluentui/react' describe('createComponent', () => { describe('className', () => { diff --git a/packages/react/test/specs/utils/doesNodeContainClick-test.ts b/packages/react/test/specs/utils/doesNodeContainClick-test.ts index fabdbf4724..3eda3f43a7 100644 --- a/packages/react/test/specs/utils/doesNodeContainClick-test.ts +++ b/packages/react/test/specs/utils/doesNodeContainClick-test.ts @@ -1,4 +1,4 @@ -import { doesNodeContainClick } from 'src/utils' +import { doesNodeContainClick } from '@fluentui/react' const makeEvent = (event?: any) => ({ clientX: 0, clientY: 0, ...event }) diff --git a/packages/react/test/specs/utils/factories-test.tsx b/packages/react/test/specs/utils/factories-test.tsx index 3ba6d4cc53..2e309d55b0 100644 --- a/packages/react/test/specs/utils/factories-test.tsx +++ b/packages/react/test/specs/utils/factories-test.tsx @@ -2,9 +2,15 @@ import { callable } from '@fluentui/styles' import * as React from 'react' import * as _ from 'lodash' import { shallow } from 'enzyme' -import { createShorthand, createShorthandFactory } from 'src/utils' -import { Props, ShorthandValue, ObjectOf, ShorthandRenderFunction } from 'src/types' -import { consoleUtil } from 'test/utils' +import { + createShorthand, + createShorthandFactory, + Props, + ShorthandValue, + ObjectOf, + ShorthandRenderFunction, +} from '@fluentui/react' +import { consoleUtil } from '../../utils' // ---------------------------------------- // Utils diff --git a/packages/react/test/specs/utils/felaDisableAnimationsPlugin-test.ts b/packages/react/test/specs/utils/felaDisableAnimationsPlugin-test.ts index d794975e73..8e72dcffa7 100644 --- a/packages/react/test/specs/utils/felaDisableAnimationsPlugin-test.ts +++ b/packages/react/test/specs/utils/felaDisableAnimationsPlugin-test.ts @@ -1,4 +1,5 @@ -import felaDisableAnimationsPlugin from 'src/utils/felaDisableAnimationsPlugin' +// This is not exported +import felaDisableAnimationsPlugin from '../../../src/utils/felaDisableAnimationsPlugin' const disableAnimationsPlugin = felaDisableAnimationsPlugin() diff --git a/packages/react/test/specs/utils/felaExpandCssShorthandsPlugin-test.ts b/packages/react/test/specs/utils/felaExpandCssShorthandsPlugin-test.ts index 2d639dcc2d..07717a8c33 100644 --- a/packages/react/test/specs/utils/felaExpandCssShorthandsPlugin-test.ts +++ b/packages/react/test/specs/utils/felaExpandCssShorthandsPlugin-test.ts @@ -1,4 +1,5 @@ -import felaExpandCssShorthandsPlugin from 'src/utils/felaExpandCssShorthandsPlugin' +// This is not exported +import felaExpandCssShorthandsPlugin from '../../../src/utils/felaExpandCssShorthandsPlugin' const expandCssShorthands = felaExpandCssShorthandsPlugin() diff --git a/packages/react/test/specs/utils/felaFocusVisibleEnhancer-test.ts b/packages/react/test/specs/utils/felaFocusVisibleEnhancer-test.ts index c7093354cc..d1a54c6513 100644 --- a/packages/react/test/specs/utils/felaFocusVisibleEnhancer-test.ts +++ b/packages/react/test/specs/utils/felaFocusVisibleEnhancer-test.ts @@ -2,7 +2,8 @@ import { createRenderer } from 'fela' import { renderToString } from 'fela-tools' import { RULE_TYPE } from 'fela-utils' -import felaFocusVisibleEnhancer from 'src/utils/felaFocusVisibleEnhancer' +// This is not exported +import felaFocusVisibleEnhancer from '../../../src/utils/felaFocusVisibleEnhancer' describe('felaFocusVisibleEnhancer', () => { test('replaces :focus-visible', () => { diff --git a/packages/react/test/specs/utils/felaInvokeKeyframesPlugin-test.ts b/packages/react/test/specs/utils/felaInvokeKeyframesPlugin-test.ts index 04157bf4fd..bff6b4e584 100644 --- a/packages/react/test/specs/utils/felaInvokeKeyframesPlugin-test.ts +++ b/packages/react/test/specs/utils/felaInvokeKeyframesPlugin-test.ts @@ -1,4 +1,5 @@ -import felaInvokeKeyframesPlugin from 'src/utils/felaInvokeKeyframesPlugin' +// This is not exported +import felaInvokeKeyframesPlugin from '../../../src/utils/felaInvokeKeyframesPlugin' const renderInvokeKeyframes = felaInvokeKeyframesPlugin() diff --git a/packages/react/test/specs/utils/felaRenderer-test.tsx b/packages/react/test/specs/utils/felaRenderer-test.tsx index 052400b716..a5901768f6 100644 --- a/packages/react/test/specs/utils/felaRenderer-test.tsx +++ b/packages/react/test/specs/utils/felaRenderer-test.tsx @@ -1,10 +1,7 @@ import * as React from 'react' import { createSnapshot } from 'jest-react-fela' -import { EmptyThemeProvider } from 'test/utils' -import Box from 'src/components/Box/Box' -import Provider from 'src/components/Provider/Provider' -import Text from 'src/components/Text/Text' -import { felaRenderer } from 'src/utils' +import { EmptyThemeProvider } from '../../utils' +import { Box, Provider, Text, felaRenderer } from '@fluentui/react' describe('felaRenderer', () => { test('basic styles are rendered', () => { diff --git a/packages/react/test/specs/utils/felaSanitizeCssPlugin-test.ts b/packages/react/test/specs/utils/felaSanitizeCssPlugin-test.ts index 34d1a9e0bb..c6793446a6 100644 --- a/packages/react/test/specs/utils/felaSanitizeCssPlugin-test.ts +++ b/packages/react/test/specs/utils/felaSanitizeCssPlugin-test.ts @@ -1,4 +1,5 @@ -import sanitizeCss from 'src/utils/felaSanitizeCssPlugin' +// This is not exported +import sanitizeCss from '../../../src/utils/felaSanitizeCssPlugin' const assertCssPropertyValue = (value: string, isValid: boolean) => { test(`assert that '${value}' is ${isValid ? 'valid' : 'invalid'}`, () => { diff --git a/packages/react/test/specs/utils/fontSizeUtility-test.ts b/packages/react/test/specs/utils/fontSizeUtility-test.ts index d26e54e660..c3dd9925e5 100644 --- a/packages/react/test/specs/utils/fontSizeUtility-test.ts +++ b/packages/react/test/specs/utils/fontSizeUtility-test.ts @@ -1,4 +1,4 @@ -import { pxToRem } from 'src/utils' +import { pxToRem } from '@fluentui/react' describe('fontSizeUtility', () => { describe('pxToRem', () => { diff --git a/packages/react/test/specs/utils/htmlInputPropsUtils-test.ts b/packages/react/test/specs/utils/htmlInputPropsUtils-test.ts index a993df54d7..9fcabc0512 100644 --- a/packages/react/test/specs/utils/htmlInputPropsUtils-test.ts +++ b/packages/react/test/specs/utils/htmlInputPropsUtils-test.ts @@ -1,4 +1,4 @@ -import { partitionHTMLProps } from 'src/utils/htmlPropsUtils' +import { partitionHTMLProps } from '@fluentui/react' const props = { autoFocus: false, diff --git a/packages/react/test/specs/utils/isBrowser-test.ts b/packages/react/test/specs/utils/isBrowser-test.ts index 393452e1cc..6a74481a4a 100644 --- a/packages/react/test/specs/utils/isBrowser-test.ts +++ b/packages/react/test/specs/utils/isBrowser-test.ts @@ -1,4 +1,4 @@ -import isBrowser from 'src/utils/isBrowser' +import { isBrowser } from '@fluentui/react' describe('isBrowser', () => { describe('browser', () => { diff --git a/packages/react/test/specs/utils/mergeProviderContexts/mergeBooleanValues-test.ts b/packages/react/test/specs/utils/mergeProviderContexts/mergeBooleanValues-test.ts index c102f739f1..a126d25c5e 100644 --- a/packages/react/test/specs/utils/mergeProviderContexts/mergeBooleanValues-test.ts +++ b/packages/react/test/specs/utils/mergeProviderContexts/mergeBooleanValues-test.ts @@ -1,3 +1,4 @@ +// This is not exported import { mergeBooleanValues } from '../../../../src/utils/mergeProviderContexts' describe('mergeBooleanValues', () => { diff --git a/packages/react/test/specs/utils/mergeProviderContexts/mergeProviderContexts-test.ts b/packages/react/test/specs/utils/mergeProviderContexts/mergeProviderContexts-test.ts index 81364c5498..bdc7d0ee68 100644 --- a/packages/react/test/specs/utils/mergeProviderContexts/mergeProviderContexts-test.ts +++ b/packages/react/test/specs/utils/mergeProviderContexts/mergeProviderContexts-test.ts @@ -1,5 +1,6 @@ -import mergeProviderContexts, { mergeRenderers } from 'src/utils/mergeProviderContexts' -import { felaRenderer } from 'src/utils/felaRenderer' +// This is not exported +import { mergeRenderers } from '../../../../src/utils/mergeProviderContexts' +import { felaRenderer, mergeProviderContexts } from '@fluentui/react' describe('mergeRenderers', () => { test(`always uses "next" renderer`, () => { diff --git a/packages/react/test/specs/utils/positioner/getScrollParent-test.ts b/packages/react/test/specs/utils/positioner/getScrollParent-test.ts index b1260fc93d..ead66d152c 100644 --- a/packages/react/test/specs/utils/positioner/getScrollParent-test.ts +++ b/packages/react/test/specs/utils/positioner/getScrollParent-test.ts @@ -1,6 +1,7 @@ import * as _ from 'lodash' -import getScrollParent from 'src/utils/positioner/getScrollParent' +// This is not exported +import getScrollParent from '../../../../src/utils/positioner/getScrollParent' const overflowStyles: Partial[] = [ { overflow: 'scroll' }, diff --git a/packages/react/test/specs/utils/positioner/positioningHelper-test.ts b/packages/react/test/specs/utils/positioner/positioningHelper-test.ts index b5b1c6870e..4918fa8568 100644 --- a/packages/react/test/specs/utils/positioner/positioningHelper-test.ts +++ b/packages/react/test/specs/utils/positioner/positioningHelper-test.ts @@ -1,7 +1,8 @@ import { Placement } from 'popper.js' -import { Alignment, Position } from 'src/utils/positioner' -import { getPlacement, applyRtlToOffset } from 'src/utils/positioner/positioningHelper' +import { Alignment, Position } from '@fluentui/react' +// These are not exported +import { getPlacement, applyRtlToOffset } from '../../../../src/utils/positioner/positioningHelper' type PositionTestInput = { align: Alignment diff --git a/packages/react/test/utils/withProvider.tsx b/packages/react/test/utils/withProvider.tsx index 9e897f2d7a..7a1e6eb493 100644 --- a/packages/react/test/utils/withProvider.tsx +++ b/packages/react/test/utils/withProvider.tsx @@ -2,7 +2,7 @@ import { ThemeInput } from '@fluentui/styles' import * as React from 'react' import { mount } from 'enzyme' import { ThemeProvider } from 'react-fela' -import { felaRenderer } from 'src/utils' +import { felaRenderer } from '@fluentui/react' export const EmptyThemeProvider: React.FunctionComponent = ({ children }) => ( {children} diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index 61bd5687e9..1435bbd4dd 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -3,10 +3,10 @@ "compilerOptions": { "composite": true, "outDir": "dist/dts", + "baseUrl": ".", "paths": { - "docs/*": ["docs/*"], - "src/*": ["packages/react/src/*"], - "test/*": ["packages/react/test/*"] + // For tests + "@fluentui/react": ["./src"] } }, "include": ["src", "test"], diff --git a/packages/styles/test/mergeThemes/mergeComponentStyles-test.ts b/packages/styles/test/mergeThemes/mergeComponentStyles-test.ts index 7098e452bb..0bd86d57c6 100644 --- a/packages/styles/test/mergeThemes/mergeComponentStyles-test.ts +++ b/packages/styles/test/mergeThemes/mergeComponentStyles-test.ts @@ -1,5 +1,6 @@ import { ComponentStyleFunctionParam, emptyTheme, withDebugId } from '@fluentui/styles' +// These are not exported import * as debugEnabled from '../../src/debugEnabled' import { mergeComponentStyles__PROD, mergeComponentStyles__DEV } from '../../src/mergeThemes' diff --git a/packages/styles/test/mergeThemes/mergeComponentVariables-test.ts b/packages/styles/test/mergeThemes/mergeComponentVariables-test.ts index 30405e9c89..d6d3034f98 100644 --- a/packages/styles/test/mergeThemes/mergeComponentVariables-test.ts +++ b/packages/styles/test/mergeThemes/mergeComponentVariables-test.ts @@ -1,5 +1,6 @@ import { objectKeyToValues, withDebugId } from '@fluentui/styles' +// These are not exported import * as debugEnabled from '../../src/debugEnabled' import { mergeComponentVariables__PROD, mergeComponentVariables__DEV } from '../../src/mergeThemes' diff --git a/packages/styles/test/mergeThemes/mergeSiteVariables-test.ts b/packages/styles/test/mergeThemes/mergeSiteVariables-test.ts index 05ba9cd5cd..3874885fdf 100644 --- a/packages/styles/test/mergeThemes/mergeSiteVariables-test.ts +++ b/packages/styles/test/mergeThemes/mergeSiteVariables-test.ts @@ -1,5 +1,6 @@ import { withDebugId } from '@fluentui/styles' +// These are not exported import * as debugEnabled from '../../src/debugEnabled' import { mergeSiteVariables__PROD, mergeSiteVariables__DEV } from '../../src/mergeThemes' diff --git a/packages/styles/test/mergeThemes/mergeThemeVariables-test.ts b/packages/styles/test/mergeThemes/mergeThemeVariables-test.ts index 842347cdbf..859303f5a8 100644 --- a/packages/styles/test/mergeThemes/mergeThemeVariables-test.ts +++ b/packages/styles/test/mergeThemes/mergeThemeVariables-test.ts @@ -1,6 +1,7 @@ import { withDebugId } from '@fluentui/styles' import * as _ from 'lodash' +// These are not exported import * as debugEnabled from '../../src/debugEnabled' import { mergeThemeVariables__PROD, mergeThemeVariables__DEV } from '../../src/mergeThemes' diff --git a/packages/styles/test/mergeThemes/mergeThemes-test.ts b/packages/styles/test/mergeThemes/mergeThemes-test.ts index fcf3015a9e..6e4a00079a 100644 --- a/packages/styles/test/mergeThemes/mergeThemes-test.ts +++ b/packages/styles/test/mergeThemes/mergeThemes-test.ts @@ -8,6 +8,7 @@ import { emptyTheme, } from '@fluentui/styles' +// This is not exported import * as debugEnabled from '../../src/debugEnabled' const styleParam: ComponentStyleFunctionParam = { diff --git a/packages/styles/tsconfig.json b/packages/styles/tsconfig.json index 0af30c77d0..e4c6162f78 100644 --- a/packages/styles/tsconfig.json +++ b/packages/styles/tsconfig.json @@ -2,7 +2,12 @@ "extends": "../../build/tsconfig.common", "compilerOptions": { "composite": true, - "outDir": "dist/dts" + "outDir": "dist/dts", + "baseUrl": ".", + "paths": { + // For tests + "@fluentui/styles": ["./src"] + } }, "include": ["src", "test"], "references": [] diff --git a/tsconfig.json b/tsconfig.json index 7f6ac3bb99..72d25bc346 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,13 @@ { - "extends": "./build/tsconfig.common.json" + "extends": "./build/tsconfig.docs.json", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@fluentui/docs": ["docs"], + "@fluentui/e2e": ["e2e"], + "@fluentui/internal-tooling": ["build"], + "@fluentui/perf": ["perf"], + "@fluentui/*": ["packages/*/src"] + } + } }