@transferwise/components 0.0.0-experimental-d7ce5d7 → 0.0.0-experimental-d82182c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
|
-
import {
|
|
3
|
+
import { fireEvent, within } from 'storybook/test';
|
|
4
4
|
import { lorem100, lorem500 } from '../../test-utils';
|
|
5
5
|
import { Typography } from '../propsValues/typography';
|
|
6
6
|
import Alert from '../../alert';
|
|
@@ -76,7 +76,8 @@ export const SmoothScrollReset: Story = {
|
|
|
76
76
|
document.documentElement.scrollTop = 400;
|
|
77
77
|
await wait(500);
|
|
78
78
|
const canvas = within(canvasElement);
|
|
79
|
-
|
|
79
|
+
// cannot use userEvent.click as it crashes on iOS Safari in the simulator
|
|
80
|
+
await fireEvent.click(canvas.getByRole('button'));
|
|
80
81
|
},
|
|
81
82
|
render: ({ open, ...args }) => {
|
|
82
83
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { fn, type Mock,
|
|
2
|
+
import { fireEvent, fn, type Mock, within } from 'storybook/test';
|
|
3
3
|
import { allModes } from '../../.storybook/modes';
|
|
4
4
|
import { lorem5, lorem500 } from '../test-utils';
|
|
5
5
|
import { Field } from '../field/Field';
|
|
@@ -72,8 +72,8 @@ export const SmoothScrollReset: Story<string> = {
|
|
|
72
72
|
document.documentElement.scrollTop = 400;
|
|
73
73
|
await wait();
|
|
74
74
|
const canvas = within(canvasElement);
|
|
75
|
-
|
|
76
|
-
await
|
|
75
|
+
// cannot use userEvent.click as it crashes on iOS Safari in the simulator
|
|
76
|
+
await fireEvent.click(canvas.getByRole('combobox'));
|
|
77
77
|
},
|
|
78
78
|
globals: {
|
|
79
79
|
viewport: { value: allModes.largeMobile.viewport, isRotated: false },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import {
|
|
2
|
+
import { within, fireEvent } from 'storybook/test';
|
|
3
3
|
import { allModes } from '../../.storybook/modes';
|
|
4
4
|
import { lorem500 } from '../test-utils';
|
|
5
5
|
import { Field } from '../field/Field';
|
|
@@ -90,8 +90,8 @@ export const SmoothScrollReset: Story = {
|
|
|
90
90
|
document.documentElement.scrollTop = 400;
|
|
91
91
|
await wait();
|
|
92
92
|
const canvas = within(canvasElement);
|
|
93
|
-
|
|
94
|
-
await
|
|
93
|
+
// cannot use userEvent.click as it crashes on iOS Safari in the simulator
|
|
94
|
+
await fireEvent.click(canvas.getByRole('combobox'));
|
|
95
95
|
},
|
|
96
96
|
globals: {
|
|
97
97
|
viewport: { value: allModes.largeMobile.viewport, isRotated: false },
|