We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcf3743 commit 2f352aeCopy full SHA for 2f352ae
src/index.ts
@@ -70,6 +70,11 @@ export class Extension implements StringifyExtension {
70
})`,
71
)
72
break
73
+ case "keyDown":
74
+ out.appendLine(
75
+ `await userEvent.keyboard(${JSON.stringify(`{${step.key}}`)})`,
76
+ )
77
+ break
78
case "navigate":
79
if (step === flow.steps.find((step) => step.type === "navigate")) {
80
for (const { url, title } of step.assertedEvents ?? []) {
src/test.ts
@@ -65,6 +65,13 @@ describe("Extension", () => {
65
},
66
'await userEvent.dblClick(screen.getByText("Test"))',
67
],
68
+ [
69
+ {
+ type: "keyDown",
+ key: "Meta",
+ },
+ 'await userEvent.keyboard("{Meta}")',
+ ],
[
{
type: "navigate",
0 commit comments