ng-flex-layout
Version:
Angular Flex-Layout =======
1 lines • 31.9 kB
Source Map (JSON)
{"version":3,"file":"ng-flex-layout-_private-utils-testing.mjs","sources":["../../../../projects/libs/flex-layout/_private-utils/testing/dom-tools.ts","../../../../projects/libs/flex-layout/_private-utils/testing/custom-matchers.ts","../../../../projects/libs/flex-layout/_private-utils/testing/custom-style-map-matchers.ts","../../../../projects/libs/flex-layout/_private-utils/testing/helpers.ts","../../../../projects/libs/flex-layout/_private-utils/testing/index.ts","../../../../projects/libs/flex-layout/_private-utils/testing/ng-flex-layout-_private-utils-testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Exported DOM accessor utility functions\n */\nexport const _dom = {\n hasStyle,\n getDistributedNodes,\n getShadowRoot,\n getText,\n getStyle,\n childNodes,\n childNodesAsList,\n hasClass,\n hasAttribute,\n getAttribute,\n hasShadowRoot,\n isCommentNode,\n isElementNode,\n isPresent,\n isShadowRoot,\n tagName,\n lastElementChild\n};\n\n// ******************************************************************************************\n// These functions are cloned from\n// * @angular/platform-browser/src/browser/GenericBrowserDomAdapter\n// and are to be used ONLY internally in custom-matchers.ts and Unit Tests\n// ******************************************************************************************\n\nfunction getStyle(element: any, stylename: string): string {\n return element.style[stylename];\n}\n\nfunction hasStyle(element: any,\n styleName: string,\n styleValue: string = '',\n inlineOnly = true): boolean {\n let value = getStyle(element, styleName) || '';\n if (!value && !inlineOnly) {\n // Search stylesheets\n value = typeof getComputedStyle === 'function' &&\n getComputedStyle(element).getPropertyValue(styleName) || '';\n }\n return styleValue ? value == styleValue : value.length > 0;\n}\n\nfunction getDistributedNodes(el: HTMLElement): Node[] {\n return (<any>el).getDistributedNodes();\n}\n\nfunction getShadowRoot(el: HTMLElement): DocumentFragment {\n return (<any>el).shadowRoot;\n}\n\nfunction getText(el: Node): string {\n return el.textContent || '';\n}\n\nfunction childNodesAsList(el: Node): any[] {\n const list = el.childNodes;\n const res = new Array(list.length);\n for (let i = 0; i < list.length; i++) {\n res[i] = list[i];\n }\n return res;\n}\n\nfunction hasClass(element: any, className: string): boolean {\n return element.classList.contains(className);\n}\n\nfunction hasAttribute(element: any, attributeName: string): boolean {\n return element.hasAttribute(attributeName);\n}\n\nfunction getAttribute(element: any, attributeName: string): string {\n return element.getAttribute(attributeName);\n}\n\nfunction childNodes(el: any): Node[] {\n return el.childNodes;\n}\n\nfunction hasShadowRoot(node: any): boolean {\n return isPresent(node.shadowRoot) && node instanceof HTMLElement;\n}\n\nfunction isCommentNode(node: Node): boolean {\n return node.nodeType === Node.COMMENT_NODE;\n}\n\nfunction isElementNode(node: Node): boolean {\n return node.nodeType === Node.ELEMENT_NODE;\n}\n\nfunction isShadowRoot(node: any): boolean {\n return node instanceof DocumentFragment;\n}\n\nfunction isPresent(obj: any): boolean {\n return obj != null;\n}\n\nfunction tagName(element: any): string {\n return element.tagName;\n}\n\n// ******************************************************************************************\n// These functions are part of the DOM API\n// and are to be used ONLY internally in custom-matchers.ts and Unit Tests\n// ******************************************************************************************\n\nfunction lastElementChild(element: any): Node|null {\n return element.lastElementChild;\n}\n\n","declare let global: any;\nconst _global = <any>(typeof window === 'undefined' ? global : window);\n\nimport { _dom as _ } from './dom-tools';\n\nimport { applyCssPrefixes, extendObject, } from 'ng-flex-layout/_private-utils';\nimport { StyleUtils } from 'ng-flex-layout/core';\nimport { expect } from 'vitest';\n\nexpect.extend({\n toHaveText(received: any, expectedText: string) {\n const actualText = elementText(received);\n const pass = actualText === expectedText;\n return {\n pass,\n message: () =>\n `Expected element text ${actualText} to ${pass ? 'not ' : ''}equal ${expectedText}`,\n };\n },\n\n toHaveCssClass(received: any, className: string) {\n const pass = _.hasClass(received, className);\n return {\n pass,\n message: () =>\n `Expected element ${received.outerHTML} ${pass ? 'not ' : ''}to have class \"${className}\"`,\n };\n },\n\n\n toHaveMap(received: { [key: string]: string }, expected: { [key: string]: string }) {\n const allPassed = Object.entries(expected).every(([k, v]) => received[k] === v);\n return {\n pass: allPassed,\n message: () =>\n `Expected map ${JSON.stringify(received)} ${allPassed ? 'not ' : ''}to match ${JSON.stringify(expected)}`,\n };\n },\n\n toHaveAttributes(received: HTMLElement, expected: { [key: string]: string }) {\n const allPassed = Object.entries(expected).every(\n ([name, value]) => _.hasAttribute(received, name) && _.getAttribute(received, name) === value\n );\n return {\n pass: allPassed,\n message: () =>\n `Expected element ${received.outerHTML} ${allPassed ? 'not ' : ''}to have attributes ${JSON.stringify(expected)}`,\n };\n },\n\n toHaveStyle(received: HTMLElement, styles: { [k: string]: string } | string, styler: StyleUtils) {\n return buildCompareStyleFunction(true)(received, styles, styler);\n },\n\n toHaveCSS(received: HTMLElement, styles: { [k: string]: string } | string, styler: StyleUtils) {\n return buildCompareStyleFunction(false)(received, styles, styler);\n },\n});\n\nfunction buildCompareStyleFunction(inlineOnly = true) {\n return function (\n actual: any,\n styles: { [k: string]: string } | string,\n styler: StyleUtils\n ) {\n const found = {};\n const styleMap: { [k: string]: string } = {};\n\n if (typeof styles === 'string') {\n styleMap[styles] = '';\n } else {\n Object.assign(styleMap, styles);\n }\n\n let allPassed = Object.keys(styleMap).length !== 0;\n Object.keys(styleMap).forEach(prop => {\n const { elHasStyle, current } = hasPrefixedStyles(\n actual,\n prop,\n styleMap[prop],\n inlineOnly,\n styler\n );\n allPassed = allPassed && elHasStyle;\n if (!elHasStyle) {\n extendObject(found, current);\n }\n });\n\n return {\n pass: allPassed,\n message: () => {\n const expectedValueStr =\n typeof styles === 'string'\n ? styleMap\n : JSON.stringify(styleMap, null, 2);\n const foundValueStr = inlineOnly\n ? actual.outerHTML\n : JSON.stringify(found);\n\n return `Expected ${foundValueStr}${!allPassed ? '' : ' not'} to contain the CSS ${typeof styles === 'string' ? 'property' : 'styles'\n } '${expectedValueStr}'`;\n }\n };\n };\n}\n\n\n/**\n * Validate presence of requested style or use fallback\n * to possible `prefixed` styles. Useful when some browsers\n * (Safari, IE, etc) will use prefixed style instead of defaults.\n */\nfunction hasPrefixedStyles(actual: HTMLElement,\n key: string,\n value: string,\n inlineOnly: boolean,\n styler: StyleUtils) {\n const current = {};\n\n if (value === '*') {\n return { elHasStyle: styler.lookupStyle(actual, key, inlineOnly) !== '', current };\n }\n\n value = value.trim();\n let elHasStyle = styler.lookupStyle(actual, key, inlineOnly) === value;\n if (!elHasStyle) {\n let prefixedStyles = applyCssPrefixes({ [key]: value });\n Object.keys(prefixedStyles).forEach(prop => {\n // Search for optional prefixed values\n elHasStyle = elHasStyle ||\n styler.lookupStyle(actual, prop, inlineOnly) === prefixedStyles[prop];\n });\n }\n // Return BOTH confirmation and current computed key values (if confirmation == false)\n return { elHasStyle, current };\n}\n\nfunction elementText(n: any): string {\n const hasNodes = (m: any) => {\n const children = _.childNodes(m);\n return children && children['length'];\n };\n\n if (n instanceof Array) {\n return n.map(elementText).join('');\n }\n\n if (_.isCommentNode(n)) {\n return '';\n }\n\n if (_.isElementNode(n) && _.tagName(n) == 'CONTENT') {\n return elementText(Array.prototype.slice.apply(_.getDistributedNodes(n)));\n }\n\n if (_.hasShadowRoot(n)) {\n return elementText(_.childNodesAsList(_.getShadowRoot(n)));\n }\n\n if (hasNodes(n)) {\n return elementText(_.childNodesAsList(n));\n }\n\n return _.getText(n);\n}\n\n","import { expect } from 'vitest';\n\nfunction unwrapNativeElement(value: any): HTMLElement {\n return (value && typeof value === 'object' && 'nativeElement' in value) ? (value as any).nativeElement : value;\n}\n\nexpect.extend({\n toHaveMap(received: Record<string, string>, expected: Record<string, string>) {\n const pass = Object.entries(expected).every(([k, v]) => received[k] === v);\n return {\n pass,\n message: () =>\n `Expected map ${JSON.stringify(received)} ${pass ? 'not ' : ''}to match ${JSON.stringify(expected)}`,\n };\n },\n toHaveCssClass(received: any, className: string) {\n const el = unwrapNativeElement(received);\n const hasClass = el.classList.contains(className);\n return {\n pass: hasClass,\n message: () =>\n `Expected element ${el.outerHTML} ${hasClass ? 'not ' : ''}to have class '${className}'`\n };\n },\n toHaveAttributes(received: any, expected: Record<string, string>) {\n const el = unwrapNativeElement(received);\n const allMatch = Object.entries(expected).every(\n ([key, value]) => el.getAttribute(key) === value\n );\n return {\n pass: allMatch,\n message: () =>\n `Expected element ${el.outerHTML} ${allMatch ? 'not ' : ''}to have attributes ${JSON.stringify(expected)}`\n };\n }\n});\n\ndeclare module 'vitest' {\n export interface Assertion<T = any> {\n toHaveMap(expected: Record<string, string>): void\n }\n export interface AsymmetricMatchersContaining {\n toHaveMap(expected: Record<string, string>): void\n }\n export interface Assertion<T = any> {\n toHaveCssClass(expected: string): void\n }\n export interface AsymmetricMatchersContaining {\n toHaveCssClass(expected: string): void\n }\n export interface Assertion<T = any> {\n toHaveAttributes(expected: Record<string, string>): void\n }\n export interface AsymmetricMatchersContaining {\n toHaveAttributes(expected: Record<string, string>): void\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n EnvironmentInjector,\n Provider,\n createComponent,\n createEnvironmentInjector,\n getDebugNode,\n} from '@angular/core';\nimport type { ComponentRef, DebugElement } from '@angular/core';\nimport { TestBed } from '@angular/core/testing';\nimport { FlexLayoutModule } from 'ng-flex-layout';\nimport { BreakPointRegistry, MediaMarshaller, MediaObserver, StyleUtils } from 'ng-flex-layout/core';\nimport { expect } from 'vitest';\n\ntype ComponentFactory = () => any;\n\ntype FixtureLike = {\n componentInstance?: any\n debugElement?: DebugElement\n nativeElement?: any\n location?: { nativeElement: any }\n injector?: any\n changeDetectorRef?: { detectChanges: () => void }\n detectChanges?: () => void\n [key: string]: any\n};\n\nfunction getHostElement(fixture: any): any {\n return fixture?.location?.nativeElement ?? fixture?.nativeElement ?? fixture?.componentRef?.location?.nativeElement;\n}\n\nfunction getInstance(fixture: any): any {\n return fixture?.componentInstance ?? fixture?.instance ?? fixture?.componentRef?.instance;\n}\n\nfunction detectChanges(fixture: any): void {\n const hostEl = fixture?.location?.nativeElement ?? fixture?.nativeElement ?? fixture?.componentRef?.location?.nativeElement;\n if (hostEl) {\n const wrapper = hostEl.querySelector('#testing-wrapper-node');\n if (wrapper) {\n wrapper.dispatchEvent(new CustomEvent('change'));\n }\n }\n\n if (typeof fixture?.detectChanges === 'function') {\n fixture.detectChanges();\n return;\n }\n if (fixture?.changeDetectorRef?.detectChanges) {\n fixture.changeDetectorRef.detectChanges();\n return;\n }\n if (fixture?.componentRef?.changeDetectorRef?.detectChanges) {\n fixture.componentRef.changeDetectorRef.detectChanges();\n }\n}\n\nfunction asFixtureLike<T>(ref: ComponentRef<T>): ComponentRef<T> & FixtureLike {\n const fixture = ref as ComponentRef<T> & FixtureLike;\n\n fixture.componentInstance ??= ref.instance;\n fixture.location ??= ref.location as any;\n fixture.injector ??= ref.injector as any;\n fixture.changeDetectorRef ??= ref.changeDetectorRef as any;\n fixture.nativeElement ??= ref.location.nativeElement;\n fixture.detectChanges ??= () => {\n const hostEl = fixture.nativeElement ?? fixture.location?.nativeElement;\n if (hostEl) {\n const wrapper = hostEl.querySelector('#testing-wrapper-node');\n if (wrapper) {\n wrapper.dispatchEvent(new CustomEvent('change'));\n }\n }\n ref.changeDetectorRef.detectChanges();\n };\n\n const debugNode = getDebugNode(ref.location.nativeElement);\n if (debugNode && (debugNode as any).children) {\n const wrapper = (debugNode as any).children.find((c: any) => c.nativeElement?.id === 'testing-wrapper-node');\n if (wrapper) {\n Object.defineProperty(debugNode, 'children', {\n get: () => wrapper.children\n });\n Object.defineProperty(debugNode, 'childNodes', {\n get: () => wrapper.childNodes\n });\n }\n fixture.debugElement ??= debugNode as DebugElement;\n }\n\n return fixture;\n}\n\ntype TrackedRef = {\n componentRef: ComponentRef<any>\n envInjector?: EnvironmentInjector\n};\n\nconst TRACKED_REFS: TrackedRef[] = [];\nlet cleanupRegistered = false;\n\nfunction registerCleanup() {\n if (cleanupRegistered) {\n return;\n }\n cleanupRegistered = true;\n\n const afterEachHook = (globalThis as any).afterEach as undefined | ((fn: () => void) => void);\n if (typeof afterEachHook !== 'function') {\n return;\n }\n\n afterEachHook(() => {\n while (TRACKED_REFS.length) {\n const tracked = TRACKED_REFS.pop()!;\n try {\n tracked.componentRef.destroy();\n } catch {\n // ignore\n }\n if (tracked.envInjector && tracked.envInjector !== (tracked.componentRef.injector as any)) {\n try {\n tracked.envInjector.destroy();\n } catch {\n // ignore\n }\n }\n }\n });\n}\n\nexport function makeCreateTestComponent(\n baseOrProviders: ComponentFactory | Provider[] = [],\n defaultProviders: Provider[] = []\n) {\n const hasBase = typeof baseOrProviders === 'function';\n const BaseComponent = hasBase ? (baseOrProviders as ComponentFactory)() : class { };\n const providers = [\n ...(hasBase ? [] : (baseOrProviders as Provider[])),\n ...defaultProviders\n ];\n\n return function createTestComponent(\n templateStr: string,\n styles: string[] = [],\n additionalProviders: Provider[] = [],\n additionalImports: any[] = []\n ) {\n registerCleanup();\n\n const DynamicTestComponent = Component({\n selector: 'test-wrapper',\n standalone: true,\n template: `<div (change)=\"0\" id=\"testing-wrapper-node\" style=\"display:contents\">${templateStr}</div>`,\n styles,\n imports: [CommonModule, FlexLayoutModule, ...additionalImports]\n })(class extends BaseComponent { });\n\n const parentInjector = TestBed.inject(EnvironmentInjector);\n const isolatedFlexProviders: Provider[] = [\n { provide: BreakPointRegistry, useClass: BreakPointRegistry },\n { provide: MediaMarshaller, useClass: MediaMarshaller },\n { provide: MediaObserver, useClass: MediaObserver },\n ];\n\n const finalProviders = [...isolatedFlexProviders, ...providers, ...additionalProviders];\n const envInjector = createEnvironmentInjector(finalProviders, parentInjector);\n\n const componentRef = createComponent(DynamicTestComponent, { environmentInjector: envInjector });\n TRACKED_REFS.push({ componentRef, envInjector });\n\n const fixture = asFixtureLike(componentRef);\n fixture.detectChanges?.();\n return fixture;\n };\n}\n\nexport function expectNativeEl(fixture: any, instanceOptions?: any): any {\n Object.assign(getInstance(fixture) ?? {}, instanceOptions || {});\n detectChanges(fixture);\n const host = getHostElement(fixture);\n const wrapper = host.querySelector('#testing-wrapper-node');\n const target = wrapper ? wrapper.children[0] : host.children[0];\n return expect(target);\n}\n\nexport function expectEl(el: HTMLElement): any {\n const native = (el as any)?.nativeElement ?? el;\n return expect(native);\n}\n\nexport function queryFor(fixture: any, selector: string): HTMLElement[] {\n const host = getHostElement(fixture);\n const wrapper = host.querySelector('#testing-wrapper-node');\n const target = wrapper ? wrapper : host;\n const nodes = Array.from(target.querySelectorAll(selector));\n return nodes.map((node) => (getDebugNode(node as any) as any) ?? node) as any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './custom-matchers';\nexport * from './custom-style-map-matchers';\nexport * from './dom-tools';\nexport * from './helpers';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_"],"mappings":";;;;;;;;AAAA;;;;;;AAMG;AAEH;;AAEG;AACU,MAAA,IAAI,GAAG;IAChB,QAAQ;IACR,mBAAmB;IACnB,aAAa;IACb,OAAO;IACP,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,aAAa;IACb,aAAa;IACb,SAAS;IACT,YAAY;IACZ,OAAO;IACP;;AAGJ;AACA;AACA;AACA;AACA;AAEA,SAAS,QAAQ,CAAC,OAAY,EAAE,SAAiB,EAAA;AAC7C,IAAA,OAAO,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;AACnC;AAEA,SAAS,QAAQ,CAAC,OAAY,EAC1B,SAAiB,EACjB,UAAA,GAAqB,EAAE,EACvB,UAAU,GAAG,IAAI,EAAA;IACjB,IAAI,KAAK,GAAG,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE;AAC9C,IAAA,IAAI,CAAC,KAAK,IAAI,CAAC,UAAU,EAAE;;AAEvB,QAAA,KAAK,GAAG,OAAO,gBAAgB,KAAK,UAAU;YAChD,gBAAgB,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAA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