Skip to content

Commit

Permalink
refactor(tests): use shorter method of getting background-color
Browse files Browse the repository at this point in the history
  • Loading branch information
mikavilpas committed Dec 30, 2024
1 parent f4d9460 commit 76213ec
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions integration-tests/cypress/e2e/blink-ripgrep/basic_spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,8 @@ describe("searching inside projects", () => {
// somewhere on the page (in the documentation window)
cy.get("span")
.filter((_, el) => el.textContent?.includes("Subtraction") ?? false)
.then((elements) => {
const matchingElements = elements.map((_, el) => {
return window.getComputedStyle(el).backgroundColor
})

return matchingElements.toArray()
})
.should("contain", rgbify(flavors.macchiato.colors.mauve.rgb))
.invoke("css", "background-color")
.should("eq", rgbify(flavors.macchiato.colors.mauve.rgb))
})
})

Expand Down

0 comments on commit 76213ec

Please sign in to comment.