mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-19 22:15:15 +00:00
test: fix gradient test by using more specific querySelector (#1954)
This commit is contained in:
parent
4b6f4650b2
commit
8d5f2da3f3
1 changed files with 4 additions and 4 deletions
|
|
@ -168,18 +168,18 @@ describe("Card", () => {
|
|||
"fill",
|
||||
"url(#gradient)",
|
||||
);
|
||||
expect(document.querySelector("defs linearGradient")).toHaveAttribute(
|
||||
expect(document.querySelector("defs #gradient")).toHaveAttribute(
|
||||
"gradientTransform",
|
||||
"rotate(90)",
|
||||
);
|
||||
expect(
|
||||
document.querySelector("defs linearGradient stop:nth-child(1)"),
|
||||
document.querySelector("defs #gradient stop:nth-child(1)"),
|
||||
).toHaveAttribute("stop-color", "#fff");
|
||||
expect(
|
||||
document.querySelector("defs linearGradient stop:nth-child(2)"),
|
||||
document.querySelector("defs #gradient stop:nth-child(2)"),
|
||||
).toHaveAttribute("stop-color", "#000");
|
||||
expect(
|
||||
document.querySelector("defs linearGradient stop:nth-child(3)"),
|
||||
document.querySelector("defs #gradient stop:nth-child(3)"),
|
||||
).toHaveAttribute("stop-color", "#f00");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue