Skip to content

Commit

Permalink
Fix intermittent RichText e2e test failure (#20457)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored and jorgefilipecosta committed Mar 16, 2020
1 parent c8c6fa1 commit 844b932
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 58 deletions.
9 changes: 2 additions & 7 deletions packages/components/src/slot-fill/bubbles-virtually/slot.js
@@ -1,12 +1,7 @@
/**
* WordPress dependencies
*/
import {
useEffect,
useRef,
useLayoutEffect,
useContext,
} from '@wordpress/element';
import { useRef, useLayoutEffect, useContext } from '@wordpress/element';
import isShallowEqual from '@wordpress/is-shallow-equal';

/**
Expand All @@ -25,7 +20,7 @@ export default function Slot( {
const ref = useRef();
const slot = useSlot( name );

useEffect( () => {
useLayoutEffect( () => {
registry.registerSlot( name, ref, fillProps );
return () => {
registry.unregisterSlot( name, ref );
Expand Down
8 changes: 7 additions & 1 deletion packages/components/src/slot-fill/stories/index.js
Expand Up @@ -13,7 +13,13 @@ import { createContext, useContext } from '@wordpress/element';
*/
import { Slot, Fill, Provider } from '../';

export default { title: 'Components/SlotFill', component: Slot };
export default {
title: 'Components/SlotFill',
component: Slot,
parameters: {
storyshots: { disable: true },
},
};

export const _default = () => {
return (
Expand Down
50 changes: 0 additions & 50 deletions storybook/test/__snapshots__/index.js.snap
Expand Up @@ -4851,56 +4851,6 @@ exports[`Storyshots Components/ScrollLock Default 1`] = `
</div>
`;

exports[`Storyshots Components/SlotFill Default 1`] = `
Array [
<h2>
Profile
</h2>,
<p>
Name:
<span />
</p>,
<p>
Age:
<span />
</p>,
]
`;

exports[`Storyshots Components/SlotFill With Context 1`] = `
Array [
<h2>
Profile
</h2>,
<p>
Name:
<span />
</p>,
<p>
Age:
<span />
</p>,
]
`;

exports[`Storyshots Components/SlotFill With Fill Props 1`] = `
Array [
<h2>
Profile
</h2>,
<p>
Name:
<span />
</p>,
<p>
Age:
<span />
</p>,
]
`;

exports[`Storyshots Components/Snackbar Default 1`] = `
<div
className="components-snackbar"
Expand Down

0 comments on commit 844b932

Please sign in to comment.