@skyux-sdk/testing
Version:
This library was generated with [Nx](https://nx.dev).
1 lines • 32.1 kB
Source Map (JSON)
{"version":3,"file":"skyux-sdk-testing.mjs","sources":["../../../../../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/index.ts","../../../../../libs/sdk/testing/src/skyux-sdk-testing.ts"],"sourcesContent":["// eslint-disable-next-line @nx/enforce-module-boundaries\nimport {\n _SkyA11yAnalyzer,\n _skyTestingCheckAccessibility,\n _skyTestingCheckExistence,\n _skyTestingCheckLibResourceTemplate,\n _skyTestingCheckLibResourceText,\n _skyTestingCheckResourceTemplate,\n _skyTestingCheckResourceText,\n _skyTestingCheckVisibility,\n _skyTestingHasCssClass,\n _skyTestingHasLibResourceText,\n _skyTestingHasResourceText,\n _skyTestingHasStyle,\n _skyTestingHasText,\n} from '@skyux-sdk/testing/private';\n\nimport axe from 'axe-core';\n\nimport type { SkyA11yAnalyzerConfig } from './a11y-analyzer-config';\nimport type { SkyToBeVisibleOptions } from './to-be-visible-options';\n\nconst windowRef: any = window;\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\n .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 { pass, message } = _skyTestingCheckVisibility(el, options);\n\n return {\n pass,\n message,\n };\n },\n };\n },\n\n toExist(): jasmine.CustomMatcher {\n return {\n compare(el: any): jasmine.CustomMatcherResult {\n const { pass, message } = _skyTestingCheckExistence(el);\n\n return { pass, message };\n },\n };\n },\n\n toHaveCssClass(): jasmine.CustomMatcher {\n return {\n compare(el: any, expectedClassName: string): jasmine.CustomMatcherResult {\n const { pass, message } = _skyTestingHasCssClass(el, expectedClassName);\n\n return { pass, message };\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 { pass, message } = _skyTestingHasStyle(el, expectedStyles);\n\n return {\n pass,\n message,\n };\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 { pass, message } = _skyTestingHasText(\n el,\n expectedText,\n trimWhitespace,\n );\n\n return { pass, message };\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 _skyTestingCheckResourceText(actual, name, args).then(\n ({ pass, message }) => {\n /*istanbul ignore else*/\n if (!pass) {\n windowRef.fail(message);\n }\n /*istanbul ignore else*/\n if (callback) {\n callback();\n }\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 void _skyTestingHasResourceText(el, name, args, trimWhitespace).then(\n ({ pass, message }) => {\n if (!pass) {\n windowRef.fail(message);\n }\n\n /*istanbul ignore else*/\n if (callback) {\n callback();\n }\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 void _skyTestingCheckResourceTemplate(el, name).then(\n ({ pass, message }) => {\n if (!pass) {\n windowRef.fail(message);\n }\n\n /*istanbul ignore else*/\n if (callback) {\n callback();\n }\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 async compare<T extends axe.ElementContext>(\n element: T,\n config?: SkyA11yAnalyzerConfig,\n ): Promise<jasmine.CustomMatcherResult> {\n const { pass, message } = await _skyTestingCheckAccessibility(\n element as Element | Document,\n config,\n );\n\n return { pass, message };\n },\n };\n },\n\n toEqualResourceText(): jasmine.CustomAsyncMatcher {\n return {\n async compare(\n actual: string,\n name: string,\n args?: any[],\n ): Promise<jasmine.CustomMatcherResult> {\n const { pass, message } = await _skyTestingCheckResourceText(\n actual,\n name,\n args,\n );\n\n return { pass, message };\n },\n };\n },\n\n toEqualLibResourceText(): jasmine.CustomAsyncMatcher {\n return {\n async compare(\n actual: string,\n name: string,\n args?: any[],\n ): Promise<jasmine.CustomMatcherResult> {\n const { pass, message } = await _skyTestingCheckLibResourceText(\n actual,\n name,\n args,\n );\n\n return { pass, message };\n },\n };\n },\n\n toHaveResourceText(): jasmine.CustomAsyncMatcher {\n return {\n async compare(\n element: any,\n name: string,\n args?: any[],\n trimWhitespace = true,\n ): Promise<jasmine.CustomMatcherResult> {\n const { pass, message } = await _skyTestingHasResourceText(\n element,\n name,\n args,\n trimWhitespace,\n );\n\n return { pass, message };\n },\n };\n },\n\n toHaveLibResourceText(): jasmine.CustomAsyncMatcher {\n return {\n async compare(\n element: any,\n name: string,\n args?: any[],\n trimWhitespace = true,\n ): Promise<jasmine.CustomMatcherResult> {\n const { pass, message } = await _skyTestingHasLibResourceText(\n element,\n name,\n args,\n trimWhitespace,\n );\n\n return { pass, message };\n },\n };\n },\n\n toMatchResourceTemplate(): jasmine.CustomAsyncMatcher {\n return {\n async compare(\n element: any,\n name: string,\n ): Promise<jasmine.CustomMatcherResult> {\n const { pass, message } = await _skyTestingCheckResourceTemplate(\n element,\n name,\n );\n\n return { pass, message };\n },\n };\n },\n\n toMatchLibResourceTemplate(): jasmine.CustomAsyncMatcher {\n return {\n async compare(\n element: any,\n name: string,\n ): Promise<jasmine.CustomMatcherResult> {\n const { pass, message } = await _skyTestingCheckLibResourceTemplate(\n element,\n name,\n );\n\n return { pass, message };\n },\n };\n },\n};\n\n/**\n * @internal\n */\nexport function registerJasmineMatchers(): void {\n if (typeof jasmine !== 'undefined') {\n windowRef.beforeEach(() => {\n jasmine.addMatchers(matchers);\n jasmine.addAsyncMatchers(asyncMatchers);\n });\n }\n}\n\nregisterJasmineMatchers();\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","// Export the a11y analyzer to avoid a breaking change. Remove in a future major version.\n// eslint-disable-next-line @nx/enforce-module-boundaries\nexport { _SkyA11yAnalyzer as SkyA11yAnalyzer } from '@skyux-sdk/testing/private';\nexport type { SkyA11yAnalyzerConfig } from './lib/matchers/a11y-analyzer-config';\nexport {\n SkyAsyncMatchers,\n SkyMatchers,\n expect,\n expectAsync,\n} from './lib/matchers/matchers';\nexport { SkyToBeVisibleOptions } from './lib/matchers/to-be-visible-options';\nexport { SkyBy } from './lib/query-predicates/sky-by';\nexport { SkyAppTestUtility } from './lib/test-utility/test-utility';\nexport { SkyAppTestUtilityDomEventOptions } from './lib/test-utility/test-utility-dom-event-options';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\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