Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover: update @floating-ui to latest version, remove custom fix for iframe positioning and scaling #46845

Merged
merged 9 commits into from
Aug 30, 2023
Prev Previous commit
Next Next commit
Remove fake timers from DotTip unit tests. Fixes popover act warnings.
  • Loading branch information
jsnajdr committed Aug 29, 2023
commit 3d62c20566af5ae9fa659eb39bbb63dfa5a691b0
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`DotTip should render correctly 1`] = `
aria-label="Editor tips"
class="components-popover nux-dot-tip is-positioned"
role="dialog"
style="position: absolute; top: 0px; left: 0px; opacity: 1; transform: none; transform-origin: 0% 50% 0;"
style="position: absolute; top: 0px; left: 0px; opacity: 0; transform: translateX(0px) translateY(0px) translateX(-2em) scale(0) translateZ(0); transform-origin: 0% 50% 0;"
tabindex="-1"
>
<div
Expand Down
16 changes: 2 additions & 14 deletions packages/nux/src/components/dot-tip/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ import userEvent from '@testing-library/user-event';
import { DotTip } from '..';

describe( 'DotTip', () => {
beforeEach( () => {
jest.useFakeTimers();
} );

afterEach( () => {
jest.useRealTimers();
} );

it( 'should not render anything if invisible', () => {
render(
<DotTip>
Expand All @@ -43,9 +35,7 @@ describe( 'DotTip', () => {
} );

it( 'should call onDismiss when the dismiss button is clicked', async () => {
const user = userEvent.setup( {
advanceTimers: jest.advanceTimersByTime,
} );
const user = userEvent.setup();
const onDismiss = jest.fn();

render(
Expand All @@ -64,9 +54,7 @@ describe( 'DotTip', () => {
} );

it( 'should call onDisable when the X button is clicked', async () => {
const user = userEvent.setup( {
advanceTimers: jest.advanceTimersByTime,
} );
const user = userEvent.setup();
const onDisable = jest.fn();

render(
Expand Down