-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2170 from eliasbruvik/FIX-2158-selectMnemonics
FIX-2158 Make select mnemonics compact
- Loading branch information
Showing
6 changed files
with
220 additions
and
207 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
Src/WitsmlExplorer.Frontend/__testUtils__/mocks/EDSMocks.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,33 @@ | ||
import { ReactNode } from "react"; | ||
|
||
// Dialog uses HTMLDialogElement which is not yet supported by jsdom, so we need to mock it. Keep an eye on https://github.com/jsdom/jsdom/issues/3294 for progress. | ||
export const mockEdsCoreReact = () => { | ||
const originalModule = jest.requireActual("@equinor/eds-core-react"); | ||
|
||
const MockDialog = ({ children }: { children: ReactNode }) => ( | ||
<div>{children}</div> | ||
); | ||
|
||
const CustomContent = ({ children }: { children: ReactNode }) => ( | ||
<div>{children}</div> | ||
); | ||
const Header = ({ children }: { children: ReactNode }) => ( | ||
<div>{children}</div> | ||
); | ||
const Title = ({ children }: { children: ReactNode }) => ( | ||
<div>{children}</div> | ||
); | ||
const Actions = ({ children }: { children: ReactNode }) => ( | ||
<div>{children}</div> | ||
); | ||
|
||
MockDialog.CustomContent = CustomContent; | ||
MockDialog.Header = Header; | ||
MockDialog.Title = Title; | ||
MockDialog.Actions = Actions; | ||
|
||
return { | ||
...originalModule, | ||
Dialog: MockDialog | ||
}; | ||
}; |
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
Oops, something went wrong.