Skip to content

Commit d41fe8d

Browse files
committed
Fix ActionBar test: Check for g-link in HTML instead of DOM element
1 parent bec5f20 commit d41fe8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/__tests__/ActionBar.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ describe("ActionBar", () => {
2424

2525
const buttons = wrapper.findAll("button");
2626
expect(buttons.length).toBe(2); // Favorite and download buttons
27-
// g-link is mocked as <a>, check for g-link component or link
28-
expect(wrapper.find("g-link-stub").exists() || wrapper.find("a").exists()).toBe(true); // Wikidata link
27+
// g-link component exists (may be stubbed)
28+
expect(wrapper.html()).toContain("g-link"); // Wikidata link
2929
});
3030

3131
it("gets correct Wikidata link", () => {

0 commit comments

Comments
 (0)