{"version":3,"file":"skyux-sdk-testing.mjs","sources":["../../../../../libs/sdk/testing/src/lib/a11y/a11y-analyzer.ts","../../../../../libs/sdk/testing/src/lib/matchers/matchers.ts","../../../../../libs/sdk/testing/src/lib/query-predicates/sky-by.ts","../../../../../libs/sdk/testing/src/lib/test-utility/test-utility.ts","../../../../../libs/sdk/testing/src/skyux-sdk-testing.ts"],"sourcesContent":["import axe from 'axe-core';\n\nimport { SkyA11yAnalyzerConfig } from './a11y-analyzer-config';\n\nfunction parseMessage(violations: axe.Result[]): string {\n  let message = 'Expected element to pass accessibility checks.\\n\\n';\n\n  violations.forEach((violation) => {\n    const wcagTags = violation.tags\n      .filter((tag) => tag.match(/wcag\\d{3}|^best*/gi))\n      .join(', ');\n\n    const nodeResults = violation.nodes.filter(\n      filterViolationNodeResults(violation),\n    );\n    const html = nodeResults.reduce(\n      (accumulator: string, node: axe.NodeResult) => {\n        const related = [...node.all, ...node.none, ...node.any]\n          .map((checkResult) => {\n            const relatedNodes = checkResult.relatedNodes || [];\n            let relatedHtml = relatedNodes\n              .map((relatedNode) =>\n                relatedNode.html.split(`\\n`).join(`\\n      `),\n              )\n              .join(`\\n\\n      `);\n            if (relatedHtml) {\n              relatedHtml = `\\n    Related Nodes:\\n      ${relatedHtml}`;\n            }\n            return `  - [${checkResult.id}] ${checkResult.message}${relatedHtml}`;\n          })\n          .join(`\\n`);\n        const newInformation: string[] = [\n          node.failureSummary\n            ? `[${node.impact?.toUpperCase()}] ${node.failureSummary\n                .split(/\\n */g)\n                .join(`\\n  - `)}`\n            : '',\n          node.ancestry ? `Ancestry: ${node.ancestry.join(', ')}` : '',\n          `Target: ${node.target.join(', ')}`,\n          node.html ? `HTML: ${node.html}` : '',\n          related,\n        ].filter((info) => !!info);\n\n        return `${accumulator}\\n\\n${newInformation.join(`\\n`)}`;\n      },\n      '',\n    );\n\n    const error = [\n      `aXe - [Rule: '${violation.id}'] ${violation.help} - WCAG: ${wcagTags}`,\n      `       Get help at: ${violation.helpUrl}\\n`,\n      `${html}\\n\\n`,\n    ].join('\\n');\n\n    message += `${error}\\n`;\n  });\n\n  return message;\n}\n\nfunction filterViolationNodeResults(\n  result: axe.Result,\n): (node: axe.NodeResult) => boolean {\n  if (\n    [\n      'aria-hidden-focus', // AG Grid uses aria-hidden on elements before they are ready\n      'aria-required-children', // AG Grid uses some aria-hidden elements that axe doesn't like\n      'aria-valid-attr', // AG Grid uses aria-description, which is still in draft\n      'scrollable-region-focusable', // AG Grid handles scrolling\n    ].includes(result.id)\n  ) {\n    return (node: axe.NodeResult) => !node.html.includes('class=\"ag-');\n  } else if (result.id === 'aria-allowed-role') {\n    const fieldsetRadiogroupRegex = new RegExp(\n      /<fieldset[^>]+role=\"radiogroup\"/,\n    );\n    return (node: axe.NodeResult) => !fieldsetRadiogroupRegex.test(node.html);\n  } else {\n    return () => true;\n  }\n}\n\nexport abstract class SkyA11yAnalyzer {\n  private static analyzer = axe;\n\n  public static run(\n    element?: axe.ElementContext,\n    config?: SkyA11yAnalyzerConfig,\n  ): Promise<void> {\n    if (element === undefined) {\n      throw new Error('No element was specified for accessibility checking.');\n    }\n\n    SkyA11yAnalyzer.analyzer.reset();\n\n    const defaults: SkyA11yAnalyzerConfig = {\n      rules: {},\n    };\n\n    // Disable autocomplete-valid\n    // Chrome browsers ignore autocomplete=\"off\", which forces us to use non-standard values\n    // to disable the browser's native autofill.\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=468153#c164\n    defaults.rules['autocomplete-valid'] = { enabled: false };\n\n    return new Promise((resolve, reject) => {\n      const callback: axe.RunCallback = (error, results) => {\n        if (error?.message) {\n          reject(error);\n          return;\n        }\n\n        const violations = results.violations.filter((violation) =>\n          violation.nodes.some(filterViolationNodeResults(violation)),\n        );\n        if (violations.length > 0) {\n          const message = parseMessage(violations);\n          reject(new Error(message));\n        }\n\n        resolve();\n      };\n\n      SkyA11yAnalyzer.analyzer.run(\n        element,\n        { ...defaults, ...config },\n        callback,\n      );\n    });\n  }\n}\n","import { TestBed } from '@angular/core/testing';\nimport { SkyAppResourcesService, SkyLibResourcesService } from '@skyux/i18n';\n\nimport axe from 'axe-core';\nimport { firstValueFrom } from 'rxjs';\n\nimport { SkyA11yAnalyzer } from '../a11y/a11y-analyzer';\nimport { SkyA11yAnalyzerConfig } from '../a11y/a11y-analyzer-config';\n\nimport { SkyToBeVisibleOptions } from './to-be-visible-options';\n\nconst windowRef: any = window;\n\nfunction getResources(name: string, args: any[] = []): Promise<string> {\n  const resourcesService = TestBed.inject(SkyAppResourcesService);\n  return firstValueFrom(resourcesService.getString(name, ...args));\n}\n\nfunction getLibResources(name: string, args: any[] = []): Promise<string> {\n  const resourcesService = TestBed.inject(SkyLibResourcesService);\n  return firstValueFrom(resourcesService.getString(name, ...args));\n}\n\nfunction isTemplateMatch(sample: string, template: string): boolean {\n  let matches = true;\n  const templateTokens = template.split(new RegExp('{\\\\d+}')).reverse();\n  let currentToken = templateTokens.pop();\n  let lastPosition = 0;\n  while (currentToken !== undefined && matches) {\n    const tokenPosition: number = sample.indexOf(currentToken, lastPosition);\n    matches = tokenPosition >= lastPosition;\n    lastPosition = tokenPosition + currentToken.length;\n    currentToken = templateTokens.pop();\n  }\n  return matches;\n}\n\nconst matchers: jasmine.CustomMatcherFactories = {\n  toBeAccessible(): jasmine.CustomMatcher {\n    return {\n      compare(\n        element: any,\n        callback?: () => void,\n        config?: SkyA11yAnalyzerConfig,\n      ): jasmine.CustomMatcherResult {\n        SkyA11yAnalyzer.run(element, config)\n          .then(() => {\n            /*istanbul ignore else*/\n            if (callback) {\n              callback();\n            }\n          })\n          .catch((err) => {\n            windowRef.fail(err.message);\n            /*istanbul ignore else*/\n            if (callback) {\n              callback();\n            }\n          });\n\n        // Asynchronous matchers are currently unsupported, but\n        // the method above works to fail the specific test in the\n        // callback manually, if checks do not pass.\n        // ---\n        // A side effect of this technique is the matcher cannot be\n        // paired with a `.not.toBeAccessible` operator (since the returned\n        // result is always `true`). For this particular matcher,\n        // checking if an element is not accessible may be irrelevant.\n        return {\n          message: '',\n          pass: true,\n        };\n      },\n    };\n  },\n\n  toBeVisible(): jasmine.CustomMatcher {\n    return {\n      compare(\n        el: Element,\n        options?: SkyToBeVisibleOptions,\n      ): jasmine.CustomMatcherResult {\n        const defaults: SkyToBeVisibleOptions = {\n          checkCssDisplay: true,\n          checkCssVisibility: false,\n          checkDimensions: false,\n          checkExists: false,\n        };\n\n        const settings = { ...defaults, ...options };\n\n        const result = {\n          pass: true,\n          message: '',\n        };\n\n        if (settings.checkExists) {\n          result.pass = !!el;\n        }\n\n        if (result.pass) {\n          const computedStyle = window.getComputedStyle(el);\n\n          if (settings.checkCssDisplay) {\n            result.pass = computedStyle.display !== 'none';\n          }\n\n          if (settings.checkCssVisibility) {\n            result.pass = computedStyle.visibility !== 'hidden';\n          }\n\n          if (settings.checkDimensions) {\n            const box = el.getBoundingClientRect();\n            result.pass = box.width > 0 && box.height > 0;\n          }\n        }\n\n        result.message = result.pass\n          ? 'Expected element to not be visible'\n          : 'Expected element to be visible';\n\n        return result;\n      },\n    };\n  },\n\n  toExist(): jasmine.CustomMatcher {\n    return {\n      compare(el: any): jasmine.CustomMatcherResult {\n        const result = {\n          pass: false,\n          message: '',\n        };\n\n        result.pass = !!el;\n\n        result.message = result.pass\n          ? 'Expected element not to exist'\n          : 'Expected element to exist';\n\n        return result;\n      },\n    };\n  },\n\n  toHaveCssClass(): jasmine.CustomMatcher {\n    return {\n      compare(el: any, expectedClassName: string): jasmine.CustomMatcherResult {\n        const result = {\n          pass: false,\n          message: '',\n        };\n\n        if (expectedClassName.indexOf('.') === 0) {\n          throw new Error(\n            'Please remove the leading dot from your class name.',\n          );\n        }\n\n        result.pass = el.classList.contains(expectedClassName);\n\n        result.message = result.pass\n          ? `Expected element not to have CSS class \"${expectedClassName}\"`\n          : `Expected element to have CSS class \"${expectedClassName}\"`;\n\n        return result;\n      },\n    };\n  },\n\n  toHaveStyle(): jasmine.CustomMatcher {\n    return {\n      compare(\n        el: any,\n        expectedStyles: Record<string, string>,\n      ): jasmine.CustomMatcherResult {\n        const message: string[] = [];\n\n        let hasFailure = false;\n\n        Object.keys(expectedStyles).forEach((styleName: string) => {\n          const styles = windowRef.getComputedStyle(el);\n          const actualStyle = styles[styleName];\n          const expectedStyle = expectedStyles[styleName];\n\n          if (actualStyle !== expectedStyle) {\n            if (!hasFailure) {\n              hasFailure = true;\n            }\n\n            message.push(\n              `Expected element not to have CSS style \"${styleName}: ${expectedStyle}\"`,\n            );\n          } else {\n            message.push(\n              `Expected element to have CSS style \"${styleName}: ${expectedStyle}\"`,\n            );\n          }\n\n          message.push(`Actual styles are: \"${styleName}: ${actualStyle}\"`);\n        });\n\n        const result = {\n          pass: !hasFailure,\n          message: message.join('\\n'),\n        };\n\n        return result;\n      },\n    };\n  },\n\n  toHaveText(): jasmine.CustomMatcher {\n    return {\n      compare(\n        el: any,\n        expectedText: string,\n        trimWhitespace = true,\n      ): jasmine.CustomMatcherResult {\n        const result = {\n          pass: false,\n          message: '',\n        };\n\n        let actualText = el.textContent;\n\n        if (trimWhitespace) {\n          actualText = actualText.trim();\n        }\n\n        result.pass = actualText === expectedText;\n\n        result.message = result.pass\n          ? `Expected element's inner text \"${actualText}\" not to be: \"${expectedText}\"`\n          : `Expected element's inner text to be: \"${expectedText}\"\\n` +\n            `Actual element's inner text was: \"${actualText}\"`;\n\n        return result;\n      },\n    };\n  },\n\n  toEqualResourceText(): jasmine.CustomMatcher {\n    return {\n      compare(\n        actual: string,\n        name: string,\n        args?: any[],\n        callback?: () => void,\n      ): jasmine.CustomMatcherResult {\n        void getResources(name, args).then((message) => {\n          /*istanbul ignore else*/\n          if (actual !== message) {\n            windowRef.fail(`Expected \"${actual}\" to equal \"${message}\"`);\n          }\n          /*istanbul ignore else*/\n          if (callback) {\n            callback();\n          }\n        });\n\n        // Asynchronous matchers are currently unsupported, but\n        // the method above works to fail the specific test in the\n        // callback manually, if checks do not pass.\n        // ---\n        // A side effect of this technique is the matcher cannot be\n        // paired with a `.not.toHaveResourceText` operator (since the returned\n        // result is always `true`).\n        return {\n          message: '',\n          pass: true,\n        };\n      },\n    };\n  },\n\n  toHaveResourceText(): jasmine.CustomMatcher {\n    return {\n      compare(\n        el: any,\n        name: string,\n        args?: any[],\n        trimWhitespace = true,\n        callback?: () => void,\n      ): jasmine.CustomMatcherResult {\n        let actual = el.textContent;\n\n        if (trimWhitespace) {\n          actual = actual.trim();\n        }\n\n        void getResources(name, args).then((message) => {\n          if (actual !== message) {\n            windowRef.fail(\n              `Expected element's inner text \"${el.textContent}\" to be \"${message}\"`,\n            );\n          }\n          /*istanbul ignore else*/\n          if (callback) {\n            callback();\n          }\n        });\n\n        // Asynchronous matchers are currently unsupported, but\n        // the method above works to fail the specific test in the\n        // callback manually, if checks do not pass.\n        // ---\n        // A side effect of this technique is the matcher cannot be\n        // paired with a `.not.toHaveResourceText` operator (since the returned\n        // result is always `true`).\n        return {\n          message: '',\n          pass: true,\n        };\n      },\n    };\n  },\n\n  toMatchResourceTemplate(): jasmine.CustomMatcher {\n    return {\n      compare(\n        el: any,\n        name: string,\n        callback?: () => void,\n      ): jasmine.CustomMatcherResult {\n        const actual = el.textContent;\n\n        void getResources(name).then((message) => {\n          if (!isTemplateMatch(actual, message)) {\n            windowRef.fail(\n              `Expected element's text \"${actual}\" to match \"${message}\"`,\n            );\n          }\n          /*istanbul ignore else*/\n          if (callback) {\n            callback();\n          }\n        });\n\n        // Asynchronous matchers are currently unsupported, but\n        // the method above works to fail the specific test in the\n        // callback manually, if checks do not pass.\n        // ---\n        // A side effect of this technique is the matcher cannot be\n        // paired with a `.not.toHaveResourceText` operator (since the returned\n        // result is always `true`).\n        return {\n          message: '',\n          pass: true,\n        };\n      },\n    };\n  },\n};\n\nconst asyncMatchers: jasmine.CustomAsyncMatcherFactories = {\n  toBeAccessible(): jasmine.CustomAsyncMatcher {\n    return {\n      compare<T extends axe.ElementContext>(\n        element: T,\n        config?: SkyA11yAnalyzerConfig,\n      ): Promise<jasmine.CustomMatcherResult> {\n        return new Promise((resolve) => {\n          SkyA11yAnalyzer.run(element, config)\n            .then(() => {\n              resolve({\n                pass: true,\n              });\n            })\n            .catch((err) => {\n              resolve({\n                pass: false,\n                message: err.message,\n              });\n            });\n        });\n      },\n    };\n  },\n\n  toEqualResourceText(): jasmine.CustomAsyncMatcher {\n    return {\n      compare(\n        actual: string,\n        name: string,\n        args?: any[],\n      ): Promise<jasmine.CustomMatcherResult> {\n        return getResources(name, args).then((message) => {\n          if (actual === message) {\n            return {\n              pass: true,\n            };\n          } else {\n            return {\n              pass: false,\n              message: `Expected \"${actual}\" to equal \"${message}\"`,\n            };\n          }\n        });\n      },\n    };\n  },\n\n  toEqualLibResourceText(): jasmine.CustomAsyncMatcher {\n    return {\n      compare(\n        actual: string,\n        name: string,\n        args?: any[],\n      ): Promise<jasmine.CustomMatcherResult> {\n        return getLibResources(name, args).then((message) => {\n          if (actual === message) {\n            return {\n              pass: true,\n            };\n          } else {\n            return {\n              pass: false,\n              message: `Expected \"${actual}\" to equal \"${message}\"`,\n            };\n          }\n        });\n      },\n    };\n  },\n\n  toHaveResourceText(): jasmine.CustomAsyncMatcher {\n    return {\n      compare(\n        element: any,\n        name: string,\n        args?: any[],\n        trimWhitespace = true,\n      ): Promise<jasmine.CustomMatcherResult> {\n        return getResources(name, args).then((message) => {\n          let actual = element.textContent;\n          if (trimWhitespace) {\n            actual = actual.trim();\n          }\n\n          if (actual === message) {\n            return {\n              pass: true,\n            };\n          } else {\n            return {\n              pass: false,\n              message: `Expected element's inner text \"${actual}\" to be \"${message}\"`,\n            };\n          }\n        });\n      },\n    };\n  },\n\n  toHaveLibResourceText(): jasmine.CustomAsyncMatcher {\n    return {\n      compare(\n        element: any,\n        name: string,\n        args?: any[],\n        trimWhitespace = true,\n      ): Promise<jasmine.CustomMatcherResult> {\n        return getLibResources(name, args).then((message) => {\n          let actual = element.textContent;\n          if (trimWhitespace) {\n            actual = actual.trim();\n          }\n          if (actual === message) {\n            return {\n              pass: true,\n            };\n          } else {\n            return {\n              pass: false,\n              message: `Expected element's inner text \"${actual}\" to be \"${message}\"`,\n            };\n          }\n        });\n      },\n    };\n  },\n\n  toMatchResourceTemplate(): jasmine.CustomAsyncMatcher {\n    return {\n      compare(\n        element: any,\n        name: string,\n      ): Promise<jasmine.CustomMatcherResult> {\n        return getResources(name).then((message) => {\n          const actual = element.textContent;\n          if (isTemplateMatch(actual, message)) {\n            return {\n              pass: true,\n            };\n          } else {\n            return {\n              pass: false,\n              message: `Expected element's text \"${actual}\" to match \"${message}\"`,\n            };\n          }\n        });\n      },\n    };\n  },\n\n  toMatchLibResourceTemplate(): jasmine.CustomAsyncMatcher {\n    return {\n      compare(\n        element: any,\n        name: string,\n      ): Promise<jasmine.CustomMatcherResult> {\n        return getLibResources(name).then((message) => {\n          const actual = element.textContent;\n          if (isTemplateMatch(actual, message)) {\n            return {\n              pass: true,\n            };\n          } else {\n            return {\n              pass: false,\n              message: `Expected element's text \"${actual}\" to match \"${message}\"`,\n            };\n          }\n        });\n      },\n    };\n  },\n};\n\nwindowRef.beforeEach(() => {\n  jasmine.addMatchers(matchers);\n  jasmine.addAsyncMatchers(asyncMatchers);\n});\n\n/**\n * Interface for \"asynchronous\" custom Sky matchers which cannot be paired with a `.not` operator.\n */\nexport interface SkyAsyncMatchers<T, U> extends jasmine.AsyncMatchers<T, U> {\n  /**\n   * Invert the matcher following this `expect`\n   */\n  not: SkyAsyncMatchers<T, U>;\n\n  /**\n   * `expect` an element to be accessible based on Web Content Accessibility\n   * Guidelines 2.0 (WCAG20) Level A and AA success criteria.\n   * @param config The configuration settings for overwriting or turning off specific accessibility checks.\n   * @see https://developer.blackbaud.com/skyux/learn/get-started/advanced/accessibility-unit-tests\n   */\n  toBeAccessible(\n    config?: SkyA11yAnalyzerConfig,\n  ): Promise<jasmine.CustomMatcherResult>;\n\n  /**\n   * `expect` the actual text to equal the text for the expected resource string.\n   * Uses `SkyAppResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares using ===.\n   * @param name The resource string to fetch from the resource file and compare against.\n   * @param args The string replacement arguments for the expected resource string.\n   */\n  toEqualResourceText(\n    name: string,\n    args?: any[],\n  ): Promise<jasmine.CustomMatcherResult>;\n\n  /**\n   * `expect` the actual text to equal the text for the expected resource string.\n   * Uses `SkyLibResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares using ===.\n   * @param name The resource string to fetch from the resource file and compare against.\n   * @param args The string replacement arguments for the expected resource string.\n   */\n  toEqualLibResourceText(\n    name: string,\n    args?: any[],\n  ): Promise<jasmine.CustomMatcherResult>;\n\n  /**\n   * `expect` the actual element to have the text for the expected resource string.\n   * Uses `SkyAppResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares using ===.\n   * @param name The resource string to fetch from the resource file and compare against.\n   * @param args The string replacement arguments for the expected resource string.\n   * @param trimWhitespace [true] Whether or not to trim whitespace from the actual element text before comparison.\n   */\n  toHaveResourceText(\n    name: string,\n    args?: any[],\n    trimWhitespace?: boolean,\n  ): Promise<jasmine.CustomMatcherResult>;\n\n  /**\n   * `expect` the actual element to have the text for the expected resource string.\n   * Uses `SkyLibResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares using ===.\n   * @param name The resource string to fetch from the resource file and compare against.\n   * @param args The string replacement arguments for the expected resource string.\n   * @param trimWhitespace [true] Whether or not to trim whitespace from the actual element text before comparison.\n   */\n  toHaveLibResourceText(\n    name: string,\n    args?: any[],\n    trimWhitespace?: boolean,\n  ): Promise<jasmine.CustomMatcherResult>;\n\n  /**\n   * `expect` the actual element to have the text for the expected resource string.\n   * Uses `SkyAppResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares the tokenized element text against the template.\n   * Essentially this matches any text that has the non-parameterized text of the template in the order of the template,\n   * regardless of the value of each of the parameters.\n   * @param name The resource string to fetch from the resource file and compare against.\n   */\n  toMatchResourceTemplate(name: string): Promise<jasmine.CustomMatcherResult>;\n\n  /**\n   * `expect` the actual element to have the text for the expected resource string.\n   * Uses `SkyLibResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares the tokenized element text against the template.\n   * Essentially this matches any text that has the non-parameterized text of the template in the order of the template,\n   * regardless of the value of each of the parameters.\n   * @param name The resource string to fetch from the resource file and compare against.\n   */\n  toMatchLibResourceTemplate(\n    name: string,\n  ): Promise<jasmine.CustomMatcherResult>;\n}\n\n/**\n * Interface for \"normal\" custom Sky matchers (includes original jasmine matchers).\n */\nexport interface SkyMatchers<T> extends jasmine.Matchers<T> {\n  /**\n   * Invert the matcher following this `expect`\n   */\n  not: SkyMatchers<T>;\n\n  /**\n   * `expect` the actual element to be visible.\n   * Checks elements style display and visibility and bounding box width/height.\n   */\n  toBeVisible(options?: SkyToBeVisibleOptions): void;\n\n  /**\n   * `expect` the actual element to exist.\n   */\n  toExist(): void;\n\n  /**\n   * `expect` the actual element to have the expected css class.\n   * @param expectedClassName The css class name to check for.\n   */\n  toHaveCssClass(expectedClassName: string): void;\n\n  /**\n   * `expect` the actual element to have the expected style(s).\n   * @param expectedStyles An object representing the style(s) to check for.\n   */\n  toHaveStyle(expectedStyles: Record<string, string>): void;\n\n  /**\n   * `expect` the actual element to have the expected text.\n   * @param expectedText The text to check for in the actual element.\n   * @param trimWhitespace [true] Whether or not to trim whitespace from the actual element text before comparison.\n   */\n  toHaveText(expectedText: string, trimWhitespace?: boolean): void;\n\n  /**\n   * `expect` the actual component to be accessible based on Web Content Accessibility\n   * Guidelines 2.0 (WCAG20) Level A and AA success criteria.\n   * @deprecated Use `await expectAsync(element).toBeAccessible()` instead.\n   * @param callback The callback to execute after accessibility checks run.\n   * @param config The configuration settings for overwriting or turning off specific accessibility checks.\n   * @see https://developer.blackbaud.com/skyux/learn/get-started/advanced/accessibility-unit-tests\n   */\n  toBeAccessible(callback?: () => void, config?: SkyA11yAnalyzerConfig): void;\n\n  /**\n   * `expect` the actual text to equal the text for the expected resource string.\n   * Uses `SkyAppResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares using ===.\n   * @deprecated Use `await expectAsync('Some message.').toEqualResourceText('foo_bar_key')` instead.\n   * @param name The resource string to fetch from the resource file and compare against.\n   * @param args The string replacement arguments for the expected resource string.\n   * @param callback The callback to execute when the comparison fails.\n   */\n  toEqualResourceText(name: string, args?: any[], callback?: () => void): void;\n\n  /**\n   * `expect` the actual element to have the text for the expected resource string.\n   * Uses `SkyAppResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares using ===.\n   * @deprecated Use `await expectAsync(element).toHaveResourceText('foo_bar_key')` instead.\n   * @param name The resource string to fetch from the resource file and compare against.\n   * @param args The string replacement arguments for the expected resource string.\n   * @param trimWhitespace [true] Whether or not to trim whitespace from the actual element text before comparison.\n   * @param callback The callback to execute when the comparison fails.\n   */\n  toHaveResourceText(\n    name: string,\n    args?: any[],\n    trimWhitespace?: boolean,\n    callback?: () => void,\n  ): void;\n\n  /**\n   * `expect` the actual element to have the text for the expected resource string.\n   * Uses `SkyAppResourcesService.getString(name, args)` to fetch the expected resource string\n   * and compares the tokenized element text against the template.\n   * Essentially this matches any text that has the non-parameterized text of the template in the order of the template,\n   * regardless of the value of each of the parameters.\n   * @deprecated Use `await expectAsync(element).toMatchResourceTemplate('foo_bar_key')` instead.\n   * @param name The resource string to fetch from the resource file and compare against.\n   * @param callback The callback to execute when the comparison fails.\n   */\n  toMatchResourceTemplate(name: string, callback?: () => void): void;\n}\n\n/**\n * Create an expectation for a spec.\n * @param actual Actual computed value to test expectations against.\n */\nexport function expect<T>(actual: T): SkyMatchers<T> {\n  return windowRef.expect(actual);\n}\n\n/**\n * Create an async expectation for a spec.\n * @param actual Actual computed value to test expectations against.\n */\nexport function expectAsync<T, U>(\n  actual: T | PromiseLike<T>,\n): SkyAsyncMatchers<T, U> {\n  return windowRef.expectAsync(actual);\n}\n","import { DebugElement, Predicate } from '@angular/core';\nimport { By } from '@angular/platform-browser';\n\nexport class SkyBy {\n  public static dataSkyId(skyId: string): Predicate<DebugElement> {\n    return By.css(`[data-sky-id=\"${skyId}\"]`);\n  }\n}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\n\nimport { SkyAppTestUtilityDomEventOptions } from './test-utility-dom-event-options';\n\nfunction getNativeEl(el: any): any {\n  if (!el) {\n    return undefined;\n  }\n\n  if (el.nativeElement) {\n    return el.nativeElement;\n  }\n\n  return el;\n}\n\nexport class SkyAppTestUtility {\n  public static fireDomEvent(\n    element: EventTarget | null | undefined,\n    eventName: string,\n    options?: SkyAppTestUtilityDomEventOptions,\n  ): void {\n    if (!element) {\n      throw new Error(\n        `Event \\`${eventName}\\` could not be fired because the element is not defined.`,\n      );\n    }\n\n    const defaults = {\n      bubbles: true,\n      cancelable: true,\n      keyboardEventInit: {},\n    };\n\n    const settings = Object.assign({}, defaults, options);\n\n    // Apply keyboard event options.\n    const event = Object.assign(\n      document.createEvent('CustomEvent'),\n      settings.keyboardEventInit,\n      settings.customEventInit,\n    );\n\n    event.initEvent(eventName, settings.bubbles, settings.cancelable);\n    element.dispatchEvent(event);\n  }\n\n  /**\n   * Returns the inner text content of an element.\n   */\n  public static getText(element: any): string | undefined {\n    const nativeEl = getNativeEl(element);\n\n    if (nativeEl) {\n      return nativeEl.innerText.trim();\n    }\n\n    return undefined;\n  }\n\n  /**\n   * Returns true if the element exists on the page.\n   */\n  public static isVisible(element: any): boolean | undefined {\n    const nativeEl = getNativeEl(element);\n\n    if (nativeEl) {\n      return getComputedStyle(nativeEl).display !== 'none';\n    }\n\n    return undefined;\n  }\n\n  /**\n   * Sets the value of an input element and triggers its 'input' and 'change' events.\n   */\n  public static setInputValue(element: any, value: string): void {\n    const inputEvent = document.createEvent('Event');\n    inputEvent.initEvent('input', false, false);\n\n    const changeEvent = document.createEvent('Event');\n    changeEvent.initEvent('change', false, false);\n\n    element.value = value;\n\n    element.dispatchEvent(inputEvent);\n  }\n\n  /**\n   * Returns the URL of an element's background image, if it exists.\n   */\n  public static getBackgroundImageUrl(el: any): string | undefined {\n    const nativeEl = getNativeEl(el);\n\n    if (nativeEl) {\n      const backgroundImageUrl = getComputedStyle(nativeEl).backgroundImage;\n\n      /* istanbul ignore else */\n      // Browser will likely not return an empty value for the computed style,\n      // but leave the if statement here anyway as a sanity check.\n      if (backgroundImageUrl) {\n        const matches = /url\\(('|\")([^'\"]+)('|\")\\)/gi.exec(backgroundImageUrl);\n\n        if (matches && matches.length > 0) {\n          return matches[2];\n        }\n      }\n    }\n\n    return undefined;\n  }\n\n  /**\n   * Returns a DebugElement representing a SKY UX component.\n   * @internal\n   * @param fixture The ComponentFixture where the SKY UX component resides.\n   * @param skyTestId The value of the `data-sky-id` property specified on the SKY UX component.\n   * @param componentSelector The selector name for the SKY UX component (e.g. 'sky-alert').\n   */\n  public static getDebugElementByTestId(\n    fixture: ComponentFixture<any>,\n    skyTestId: string,\n    componentSelector: string,\n  ): DebugElement {\n    const skyEl = fixture.debugElement.query(\n      By.css(`[data-sky-id=\"${skyTestId}\"]`),\n    );\n\n    if (!skyEl) {\n      throw new Error(\n        `No element was found with a \\`data-sky-id\\` value of \"${skyTestId}\".`,\n      );\n    }\n\n    if (skyEl.name !== componentSelector) {\n      throw new Error(\n        `The element with the test ID \"${skyTestId}\" is not a component of type ${componentSelector}.\"`,\n      );\n    }\n\n    return skyEl;\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIA,SAAS,YAAY,CAAC,UAAwB,EAAA;IAC5C,IAAI,OAAO,GAAG,oDAAoD;AAElE,IAAA,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAI;AAC/B,QAAA,MAAM,QAAQ,GAAG,SAAS,CAAC;AACxB,aAAA,MAAM,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC;aAC/C,IAAI,CAAC,IAAI,CAAC;AAEb,QAAA,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,CACxC,0BAA0B,CAAC,SAAS,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