We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
play()
1 parent 893927a commit 9df1adaCopy full SHA for 9df1ada
1 file changed
packages/eui/src/components/header/header_links/header_links.stories.tsx
@@ -46,11 +46,18 @@ export const Playground: Story = {
46
</EuiHeaderSection>
47
</EuiHeader>
48
),
49
- play: async ({ canvasElement }) => {
+ play: async ({ canvasElement, step }) => {
50
const canvas = within(canvasElement);
51
- await waitFor(async () => {
52
- await fireEvent.click(canvas.getByLabelText('Open menu'));
+ await waitFor(() => canvas.getByLabelText('App menu')); // Wait for rendering to finish
+
53
+ step('Open mobile popover', async () => {
54
+ await waitFor(async () => {
55
+ const mobilePopover = canvas.queryByLabelText('Open menu');
56
+ if (mobilePopover) {
57
+ await fireEvent.click(mobilePopover);
58
+ await canvas.waitForEuiPopoverVisible();
59
+ }
60
+ });
61
});
- await canvas.waitForEuiPopoverVisible();
62
},
63
};
0 commit comments