Skip to content

Commit 8d5f2da

Browse files
authored
test: fix gradient test by using more specific querySelector (#1954)
1 parent 4b6f465 commit 8d5f2da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/card.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,18 @@ describe("Card", () => {
168168
"fill",
169169
"url(#gradient)",
170170
);
171-
expect(document.querySelector("defs linearGradient")).toHaveAttribute(
171+
expect(document.querySelector("defs #gradient")).toHaveAttribute(
172172
"gradientTransform",
173173
"rotate(90)",
174174
);
175175
expect(
176-
document.querySelector("defs linearGradient stop:nth-child(1)"),
176+
document.querySelector("defs #gradient stop:nth-child(1)"),
177177
).toHaveAttribute("stop-color", "#fff");
178178
expect(
179-
document.querySelector("defs linearGradient stop:nth-child(2)"),
179+
document.querySelector("defs #gradient stop:nth-child(2)"),
180180
).toHaveAttribute("stop-color", "#000");
181181
expect(
182-
document.querySelector("defs linearGradient stop:nth-child(3)"),
182+
document.querySelector("defs #gradient stop:nth-child(3)"),
183183
).toHaveAttribute("stop-color", "#f00");
184184
});
185185
});

0 commit comments

Comments
 (0)