forked from elastic/eui
-
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.
[EuiPortal] Revert function component change while maintaining SSR fix (
elastic#6105) * Revert "[EuiPortal] convert to a function component, fix ssr bug (elastic#6055)" This reverts commit 3aacaf9. * Re-revert / keep portal test changes * Restore `data-euiportal` attr for snapshot purposes * Restore SSR bugfix + add SSR tests * Changelog * Skip failing Cypress test that doesn't apply to class component
- Loading branch information
Constance
authored
Aug 4, 2022
1 parent
ac21e25
commit 6091d38
Showing
8 changed files
with
145 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @jest-environment node | ||
*/ | ||
/* eslint-disable local/require-license-header */ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { renderToString } from 'react-dom/server'; | ||
|
||
import { EuiPortal } from './portal'; | ||
|
||
describe('EuiPortal', () => { | ||
it('renders server-side without crashing and as empty', () => { | ||
const renderOnServer = () => renderToString(<EuiPortal>test</EuiPortal>); | ||
expect(renderOnServer).not.toThrow(); | ||
expect(renderOnServer()).toEqual(''); | ||
}); | ||
}); |
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.