Skip to content

Commit

Permalink
fix: add right click in MkContextMenu play
Browse files Browse the repository at this point in the history
  • Loading branch information
zyoshoka committed May 21, 2024
1 parent 39eb530 commit 889dc68
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
import { StoryObj } from '@storybook/vue3';
import { userEvent, within } from '@storybook/test';
import MkContextMenu from './MkContextMenu.vue';
import * as os from '@/os.js';
export const Empty = {
Expand Down Expand Up @@ -34,6 +35,11 @@ export const Empty = {
args: {
items: [],
},
async play({ canvasElement }) {
const canvas = within(canvasElement);
const target = canvas.getByText('Right Click Here');
await userEvent.pointer({ keys: '[MouseRight>]', target });
},
parameters: {
layout: 'centered',
},
Expand Down

0 comments on commit 889dc68

Please sign in to comment.