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:
@@ -39,9 +39,8 @@ export const Default: Story = {
|
||||
href: "https://www.scandichotels.com/en",
|
||||
},
|
||||
render: (args) => <TextLink {...args}>Default link</TextLink>,
|
||||
play: async ({ canvasElement }) => {
|
||||
const link = canvasElement.querySelector("a")
|
||||
if (!link) throw new Error("Link not found")
|
||||
play: async ({ canvas }) => {
|
||||
const link = await canvas.findByRole("link")
|
||||
expect(link).toBeInTheDocument()
|
||||
},
|
||||
}
|
||||
@@ -52,9 +51,8 @@ export const Inverted: Story = {
|
||||
theme: "Inverted",
|
||||
},
|
||||
render: (args) => <TextLink {...args}>Inverted link</TextLink>,
|
||||
play: async ({ canvasElement }) => {
|
||||
const link = canvasElement.querySelector("a")
|
||||
if (!link) throw new Error("Link not found")
|
||||
play: async ({ canvas }) => {
|
||||
const link = await canvas.findByRole("link")
|
||||
expect(link).toBeInTheDocument()
|
||||
},
|
||||
}
|
||||
@@ -65,9 +63,8 @@ export const Disabled: Story = {
|
||||
isDisabled: true,
|
||||
},
|
||||
render: (args) => <TextLink {...args}>Disabled link</TextLink>,
|
||||
play: async ({ canvasElement }) => {
|
||||
const link = canvasElement.querySelector("a")
|
||||
if (!link) throw new Error("Link not found")
|
||||
play: async ({ canvas }) => {
|
||||
const link = await canvas.findByRole("link")
|
||||
expect(link).toBeInTheDocument()
|
||||
},
|
||||
}
|
||||
@@ -82,9 +79,8 @@ export const WithIcon: Story = {
|
||||
<MaterialIcon icon="arrow_forward" size={24} color="CurrentColor" />
|
||||
</TextLink>
|
||||
),
|
||||
play: async ({ canvasElement }) => {
|
||||
const link = canvasElement.querySelector("a")
|
||||
if (!link) throw new Error("Link not found")
|
||||
play: async ({ canvas }) => {
|
||||
const link = await canvas.findByRole("link")
|
||||
expect(link).toBeInTheDocument()
|
||||
},
|
||||
}
|
||||
@@ -95,9 +91,8 @@ export const Small: Story = {
|
||||
typography: "Link/sm",
|
||||
},
|
||||
render: (args) => <TextLink {...args}>Small link</TextLink>,
|
||||
play: async ({ canvasElement }) => {
|
||||
const link = canvasElement.querySelector("a")
|
||||
if (!link) throw new Error("Link not found")
|
||||
play: async ({ canvas }) => {
|
||||
const link = await canvas.findByRole("link")
|
||||
expect(link).toBeInTheDocument()
|
||||
},
|
||||
}
|
||||
@@ -113,9 +108,8 @@ export const SmallWithIcon: Story = {
|
||||
<MaterialIcon icon="arrow_forward" size={20} color="CurrentColor" />
|
||||
</TextLink>
|
||||
),
|
||||
play: async ({ canvasElement }) => {
|
||||
const link = canvasElement.querySelector("a")
|
||||
if (!link) throw new Error("Link not found")
|
||||
play: async ({ canvas }) => {
|
||||
const link = await canvas.findByRole("link")
|
||||
expect(link).toBeInTheDocument()
|
||||
},
|
||||
}
|
||||
@@ -135,9 +129,8 @@ export const Inline: Story = {
|
||||
</p>
|
||||
</Typography>
|
||||
),
|
||||
play: async ({ canvasElement }) => {
|
||||
const link = canvasElement.querySelector("a")
|
||||
if (!link) throw new Error("Link not found")
|
||||
play: async ({ canvas }) => {
|
||||
const link = await canvas.findByRole("link")
|
||||
expect(link).toBeInTheDocument()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user