workspace
This commit is contained in:
41
packages/reacord/test/link.test.tsx
Normal file
41
packages/reacord/test/link.test.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import React from "react"
|
||||
import { ReacordTester } from "../library/core/reacord-tester"
|
||||
import { Link } from "../library/main"
|
||||
|
||||
const tester = new ReacordTester()
|
||||
|
||||
test("link", async () => {
|
||||
await tester.assertRender(
|
||||
<>
|
||||
<Link url="https://example.com/">link text</Link>
|
||||
<Link label="link text" url="https://example.com/" />
|
||||
<Link label="link text" url="https://example.com/" disabled />
|
||||
</>,
|
||||
[
|
||||
{
|
||||
content: "",
|
||||
embeds: [],
|
||||
actionRows: [
|
||||
[
|
||||
{
|
||||
type: "link",
|
||||
url: "https://example.com/",
|
||||
label: "link text",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
url: "https://example.com/",
|
||||
label: "link text",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
url: "https://example.com/",
|
||||
label: "link text",
|
||||
disabled: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user