Skip to content

Commit 99faaa8

Browse files
authored
chore: add link test (#10763)
1 parent 641fac8 commit 99faaa8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/main/cypress/specs/Link.cy.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
import Link from "../../src/Link.js";
22

3+
describe("Main functionality", () => {
4+
it("clicking the link works", () => {
5+
cy.mount(<Link href="#test">Click me</Link>);
6+
7+
cy.url().should("not.include", "#test");
8+
9+
cy.get("[ui5-link]")
10+
.shadow()
11+
.find("a")
12+
.as("link")
13+
.realClick();
14+
15+
cy.url().should("include", "#test");
16+
});
17+
});
18+
319
describe("Accessibility", () => {
420
it("setting accessible-description is applied to button tag", () => {
521
cy.mount(<Link accessibleDescription="A long description."></Link>);

0 commit comments

Comments
 (0)