forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into marcosmoura/fix/card-a11y
* master: (34 commits) chore(react-tooltip): migrate to new package structure (microsoft#25818) chore(react-field): migrate to new package structure (microsoft#25817) Update vr screenshotdiff lib to accept vr host url as param (microsoft#25772) feat(scripts): enable strict checking for additional sub-folders(packages) v4 (microsoft#25710) fix(tools): bump norhtstar packages v9 deps on dep mismatch resolution (microsoft#25806) feat: remove react-storybook and replace its functionality via standard react-storybook-addon package (microsoft#25786) applying package updates chore(react-spinbutton): migrate to new package structure (microsoft#25813) chore(react-spinner): migrate to new package structure (microsoft#25814) chore(react-provider): migrate to new package structure (microsoft#25809) chore(react-radio, shared-contexts): migrate to new package structure (microsoft#25810) chore(react-theme): migrate to new package structure (microsoft#25812) docs: add Fluent UI Insights EP04 to README (microsoft#25775) chore(react-migration-v8-v9): use same build process/setup as v9/ts-solution packages (microsoft#25679) docs: Improves `Table` documentation (microsoft#25787) feat: improve react-18 tests (microsoft#25758) docs: Add examples for DataGrid (microsoft#25783) chore(react-tree): scaffold TreeItemLayout (microsoft#25781) perf: make ts-minbar test compilation faster and asset preparation simpler (microsoft#25754) chore: creates TreeItem and basic Tree (microsoft#25742) ...
- Loading branch information
Showing
565 changed files
with
5,105 additions
and
5,363 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
{ | ||
"extends": ["plugin:@fluentui/eslint-plugin/react--legacy"], | ||
"extends": ["plugin:@fluentui/eslint-plugin/react"], | ||
"root": true, | ||
"rules": { | ||
"deprecation/deprecation": "off", | ||
"prefer-const": "off" | ||
} | ||
"rules": {} | ||
} |
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
45 changes: 0 additions & 45 deletions
45
apps/react-18-tests-v8/src/components/ContextualMenu/ContextualMenu.e2e.tsx
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
apps/react-18-tests-v8/src/components/ContextualMenu/ContextualMenu.test.tsx
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
apps/react-18-tests-v8/src/components/ContextualMenu/ContextualMenuExample.cy.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from 'react'; | ||
import { mount } from '@cypress/react'; | ||
|
||
import { ContextualMenuExample } from './ContextualMenuExample'; | ||
|
||
const menuTriggerSelector = '[type="button"]'; | ||
const menuSelector = '[role="menu"]'; | ||
|
||
describe('ContextualMenu in React 18', () => { | ||
it('renders ContextualMenu when trigger button is clicked', () => { | ||
mount( | ||
<React.StrictMode> | ||
<ContextualMenuExample /> | ||
</React.StrictMode>, | ||
); | ||
|
||
cy.get(menuTriggerSelector).click().get(menuSelector).should('be.visible'); | ||
}); | ||
}); |
29 changes: 29 additions & 0 deletions
29
apps/react-18-tests-v8/src/components/ContextualMenu/ContextualMenuExample.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import userEvent from '@testing-library/user-event'; | ||
|
||
import { ContextualMenuExample } from './ContextualMenuExample'; | ||
|
||
describe('ContextualMenu in React 18', () => { | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
const noop = () => {}; | ||
|
||
beforeEach(() => { | ||
jest.spyOn(console, 'warn').mockImplementation(noop); | ||
}); | ||
|
||
it('should render ContextualMenu when trigger button is clicked', () => { | ||
const { getByRole, queryAllByRole } = render( | ||
<React.StrictMode> | ||
<ContextualMenuExample /> | ||
</React.StrictMode>, | ||
); | ||
|
||
expect(queryAllByRole('menu').length).toBe(0); | ||
|
||
const menuTrigger = getByRole('button'); | ||
userEvent.click(menuTrigger); | ||
|
||
expect(queryAllByRole('menu').length).toBe(1); | ||
}); | ||
}); |
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.