Improve tests
This commit is contained in:
@ -60,7 +60,7 @@ export const Favorites = () => {
|
|||||||
draggableItems={
|
draggableItems={
|
||||||
<>
|
<>
|
||||||
{favorites.map((favorite, index) => {
|
{favorites.map((favorite, index) => {
|
||||||
const { id, person, company, position } = favorite;
|
const { id, person, company } = favorite;
|
||||||
return (
|
return (
|
||||||
<DraggableItem
|
<DraggableItem
|
||||||
key={id}
|
key={id}
|
||||||
@ -68,7 +68,6 @@ export const Favorites = () => {
|
|||||||
index={index}
|
index={index}
|
||||||
itemComponent={
|
itemComponent={
|
||||||
<>
|
<>
|
||||||
{position}
|
|
||||||
{person && (
|
{person && (
|
||||||
<NavItem
|
<NavItem
|
||||||
key={id}
|
key={id}
|
||||||
|
|||||||
@ -53,7 +53,6 @@ export const Dropdown = ({
|
|||||||
const { isDropdownOpen, toggleDropdown, closeDropdown, dropdownWidth } =
|
const { isDropdownOpen, toggleDropdown, closeDropdown, dropdownWidth } =
|
||||||
useDropdown();
|
useDropdown();
|
||||||
|
|
||||||
const dropdownWidthState = dropdownMenuWidth ?? dropdownWidth;
|
|
||||||
const offsetMiddlewares = [];
|
const offsetMiddlewares = [];
|
||||||
if (dropdownOffset.x) {
|
if (dropdownOffset.x) {
|
||||||
offsetMiddlewares.push(offset({ crossAxis: dropdownOffset.x }));
|
offsetMiddlewares.push(offset({ crossAxis: dropdownOffset.x }));
|
||||||
@ -112,7 +111,7 @@ export const Dropdown = ({
|
|||||||
)}
|
)}
|
||||||
{isDropdownOpen && (
|
{isDropdownOpen && (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
width={dropdownWidthState}
|
width={dropdownMenuWidth ?? dropdownWidth}
|
||||||
data-select-disable
|
data-select-disable
|
||||||
ref={refs.setFloating}
|
ref={refs.setFloating}
|
||||||
style={floatingStyles}
|
style={floatingStyles}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import {
|
|||||||
PageDecoratorArgs,
|
PageDecoratorArgs,
|
||||||
} from '~/testing/decorators/PageDecorator';
|
} from '~/testing/decorators/PageDecorator';
|
||||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||||
|
import { sleep } from '~/testing/sleep';
|
||||||
|
|
||||||
import { SettingsNewObject } from '../SettingsNewObject';
|
import { SettingsNewObject } from '../SettingsNewObject';
|
||||||
|
|
||||||
@ -24,4 +25,8 @@ export default meta;
|
|||||||
|
|
||||||
export type Story = StoryObj<typeof SettingsNewObject>;
|
export type Story = StoryObj<typeof SettingsNewObject>;
|
||||||
|
|
||||||
export const Default: Story = {};
|
export const Default: Story = {
|
||||||
|
play: async ({}) => {
|
||||||
|
await sleep(100);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user