Merged in chore/fix-tests (pull request #3430)

Chore/fix tests

* chore: Upgrade nextjs@16.1.1

* chore: upgrade next@16.1.1

* upgrade underlying types

* merge

* Fix broken tests

* bump @swc/plugin-formatjs to latest version

* bump sentry

* transpile "import-in-the-middle" & "require-in-the-middle"

* revert next@16.1.1 upgrade

* revert transpilation addition

* .
This commit is contained in:
Joakim Jäderberg
2026-01-13 13:48:06 +00:00
parent dba4c81618
commit d284e82828
15 changed files with 334 additions and 157 deletions

View File

@@ -116,7 +116,7 @@ export const Default: Story = {
iconName: "search",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -268,7 +268,7 @@ export const Filled: Story = {
variant: "Filled",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -279,7 +279,7 @@ export const FilledDisabled: Story = {
isDisabled: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(0)
},
}
@@ -290,7 +290,7 @@ export const FilledOnDarkBackground: Story = {
...Filled.args,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -302,7 +302,7 @@ export const FilledWithEmphasis: Story = {
emphasis: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -313,7 +313,7 @@ export const FilledWithEmphasisDisabled: Story = {
isDisabled: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(0)
},
}
@@ -325,7 +325,7 @@ export const Outlined: Story = {
variant: "Outlined",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -336,7 +336,7 @@ export const OutlinedDisabled: Story = {
isDisabled: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(0)
},
}
@@ -348,7 +348,7 @@ export const Elevated: Story = {
variant: "Elevated",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -359,7 +359,7 @@ export const ElevatedDisabled: Story = {
isDisabled: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(0)
},
}
@@ -372,7 +372,7 @@ export const Faded: Story = {
variant: "Faded",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -384,7 +384,7 @@ export const FadedDisabled: Story = {
isDisabled: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(0)
},
}
@@ -397,7 +397,7 @@ export const Muted: Story = {
variant: "Muted",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -409,7 +409,7 @@ export const MutedDisabled: Story = {
isDisabled: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(0)
},
}
@@ -420,7 +420,7 @@ export const MutedWithEmphasis: Story = {
emphasis: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -431,7 +431,7 @@ export const MutedWithEmphasisDisabled: Story = {
isDisabled: true,
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(canvas.getByRole("button"))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(0)
},
}