-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port react-conformance tests to testing-library
- Loading branch information
1 parent
31065b9
commit c8b0113
Showing
44 changed files
with
235 additions
and
267 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-conformance-7d889654-5e80-427c-b5ac-8437beabc7a1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "BREAKING CHANGE: Switch from Enzyme to `@testing-library/react` and remove Enzyme-specific APIs", | ||
"packageName": "@fluentui/react-conformance", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-conformance-griffel-0e193d59-759e-48f2-a8a2-d0b3fb5bfb55.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Update tsconfig to include Node types in local build now that they're no longer leaked by react-conformance", | ||
"packageName": "@fluentui/react-conformance-griffel", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
packages/fluentui/react-northstar/test/specs/components/Form/FormDatepicker-test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { isConformant } from 'test/specs/commonTests'; | ||
import { FormDatepicker } from 'src/components/Form/FormDatepicker'; | ||
import { Datepicker } from 'src/components/Datepicker/Datepicker'; | ||
import { FormDatepicker, formDatepickerClassName } from 'src/components/Form/FormDatepicker'; | ||
import { Datepicker, datepickerClassName } from 'src/components/Datepicker/Datepicker'; | ||
|
||
describe('FormDatepicker', () => { | ||
isConformant(FormDatepicker, { | ||
testPath: __filename, | ||
constructorName: 'FormDatepicker', | ||
forwardsRefTo: false, | ||
targetComponent: Datepicker, | ||
getTargetElement: (result, attr) => | ||
attr === 'className' | ||
? result.container.querySelector(`.${formDatepickerClassName}`) | ||
: result.container.querySelector(`.${datepickerClassName}`), | ||
}); | ||
}); |
8 changes: 6 additions & 2 deletions
8
packages/fluentui/react-northstar/test/specs/components/Form/FormDropdown-test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { isConformant } from 'test/specs/commonTests'; | ||
import { FormDropdown } from 'src/components/Form/FormDropdown'; | ||
import { Dropdown } from 'src/components/Dropdown/Dropdown'; | ||
import { FormDropdown, formDropdownClassName } from 'src/components/Form/FormDropdown'; | ||
import { Dropdown, dropdownClassName } from 'src/components/Dropdown/Dropdown'; | ||
|
||
describe('FormDropdown', () => { | ||
isConformant(FormDropdown, { | ||
testPath: __filename, | ||
constructorName: 'FormDropdown', | ||
forwardsRefTo: false, | ||
targetComponent: Dropdown, | ||
getTargetElement: (result, attr) => | ||
attr === 'className' | ||
? result.container.querySelector(`.${formDropdownClassName}`) | ||
: result.container.querySelector(`.${dropdownClassName}`), | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 7 additions & 8 deletions
15
packages/react-accordion/src/components/AccordionPanel/AccordionPanel.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
const { createConfig } = require('@fluentui/scripts/jest/jest-resources'); | ||
const path = require('path'); | ||
|
||
const config = createConfig({ | ||
setupFiles: [path.resolve(path.join(__dirname, 'config', 'tests.js'))], | ||
}); | ||
const config = createConfig({}); | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.