-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(link-list): update utils (#7692)
### Related Ticket(s) none ### Description Add a utils folder within cypress and update link-list tests <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) -->
- Loading branch information
1 parent
a5bb87e
commit 92912bb
Showing
5 changed files
with
26 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/web-components/tests/e2e-storybook/cypress/utils/get-css-property-for-rule.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Copyright IBM Corp. 2021 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
export default function getCssPropertyForRule(rule, prop, sheets) { | ||
const slen = sheets.length; | ||
for (let i = 0; i < slen; i++) { | ||
let rules; | ||
try { | ||
rules = sheets[i].cssRules; | ||
} catch (e) { | ||
continue; | ||
} | ||
const rlen = rules.length; | ||
for (let j = 0; j < rlen; j++) { | ||
if (rules[j].selectorText === rule) { | ||
return rules[j].style[prop]; | ||
} | ||
} | ||
} | ||
} |
33 changes: 0 additions & 33 deletions
33
packages/web-components/tests/utils/get-css-property-for-rule.ts
This file was deleted.
Oops, something went wrong.