mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import SeedAddress from "./SeedAddress.svelte";
|
|
import { render } from "@testing-library/svelte";
|
|
import "@public/index.css";
|
|
|
|
describe("SeedAddress", () => {
|
|
it("shows the seed emoji and seed host", () => {
|
|
render(SeedAddress, {
|
|
props: {
|
|
seed: {
|
|
id: "hydkkkf5ksbe5fuszdhpqhytu3q36gwagj874wxwpo5a8ti8coygh1",
|
|
emoji: "🐱",
|
|
host: "seed.cloudhead.io",
|
|
},
|
|
port: 8776,
|
|
},
|
|
});
|
|
cy.get("span.seed-icon").should("have.text", "🐱");
|
|
cy.findByText("seed.cloudhead.io")
|
|
.should("have.attr", "href", "/seeds/seed.cloudhead.io")
|
|
.should("be.visible");
|
|
});
|
|
|
|
it("shows the full seed id", () => {
|
|
render(SeedAddress, {
|
|
props: {
|
|
seed: {
|
|
id: "hydkkkf5ksbe5fuszdhpqhytu3q36gwagj874wxwpo5a8ti8coygh1",
|
|
emoji: "🐱",
|
|
host: "seed.cloudhead.io",
|
|
},
|
|
port: 8776,
|
|
full: true,
|
|
},
|
|
});
|
|
cy.get("span.seed-icon").should("have.text", "🐱");
|
|
cy.findByText("hydkkk…coygh1@seed.cloudhead.io").should("be.visible");
|
|
cy.findByText(":8776").should("be.visible");
|
|
});
|
|
});
|