Skip to content

Commit

Permalink
test(themed): simplify the test
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonailea committed Oct 29, 2024
1 parent 46623a1 commit 637db20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/calcite-components/src/tests/commonTests/themed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,8 @@ async function assertThemedProps(page: E2EPage, options: TestTarget): Promise<vo
const isLinearGradientUnderlineToken = token.includes("link-underline-color") && targetProp === "backgroundImage";

if (isFakeBorderColorToken || isLinearGradientUnderlineToken) {
const regexStr = new RegExp(expectedValue, "g");
// We only need to test that the expected value is set somewhere in the computed style
expect(styles[targetProp]).toMatch(regexStr);
expect(styles[targetProp]).toContain(expectedValue);
return;
}

Expand Down

0 comments on commit 637db20

Please sign in to comment.