{"version":3,"file":"bravura-ui-radio-panel-testing.mjs","sources":["../../../projects/ui/radio-panel/testing/test-api.ts","../../../projects/ui/radio-panel/testing/bravura-ui-radio-panel-testing.ts"],"sourcesContent":["import { ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';\r\nimport {\r\n\tMatRadioButtonHarness,\r\n\tMatRadioGroupHarness,\r\n\tRadioButtonHarnessFilters\r\n} from '@angular/material/radio/testing';\r\n\r\nexport interface RadioPanelItemHarnessFilters extends RadioButtonHarnessFilters {\r\n\tvalue?: string | RegExp;\r\n}\r\n\r\nexport class RadioPanelItemHarness extends MatRadioButtonHarness {\r\n\tstatic hostSelector = 'bui-radio-panel-item';\r\n\tgetLabelElement = this.locatorFor('label');\r\n\r\n\tprotected _textLabel = this.locatorFor('label .bui-label-title');\r\n\tprotected _clickLabel = this.getLabelElement;\r\n\r\n\t/**\r\n\t * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\r\n\t * attributes.\r\n\t * @param options Options for filtering which radio button instances are considered a match.\r\n\t * @return a `HarnessPredicate` configured with the given options.\r\n\t */\r\n\tstatic with<T extends MatRadioButtonHarness>(\r\n\t\tthis: ComponentHarnessConstructor<T>,\r\n\t\toptions: RadioPanelItemHarnessFilters = {}\r\n\t): HarnessPredicate<T> {\r\n\t\treturn MatRadioButtonHarness.with\r\n\t\t\t.bind(this)(options)\r\n\t\t\t.addOption('value', options.value, (harness, value) =>\r\n\t\t\t\tHarnessPredicate.stringMatches(harness.getValue(), value)\r\n\t\t\t) as HarnessPredicate<T>;\r\n\t}\r\n\r\n\tasync click() {\r\n\t\tconst element = await this.getLabelElement();\r\n\t\telement.click();\r\n\t}\r\n\r\n\tasync getLabelCssValue(prop: string): Promise<string> {\r\n\t\tconst element = await this.getLabelElement();\r\n\t\treturn element.getCssValue(prop);\r\n\t}\r\n\r\n\tasync getBorderColor(): Promise<string> {\r\n\t\tconst label = await this.getLabelElement();\r\n\t\treturn label.getCssValue('border-color');\r\n\t}\r\n}\r\n\r\nexport class RadioPanelHarness extends MatRadioGroupHarness {\r\n\t/** The selector for the host element of a `MatRadioGroup` instance. */\r\n\tstatic hostSelector = 'bui-radio-panel';\r\n\r\n\tgetItem = (filters: RadioPanelItemHarnessFilters) => this.locatorFor(RadioPanelItemHarness.with(filters))();\r\n\r\n\tasync getFlexDir(): Promise<string> {\r\n\t\treturn (await this.host()).getCssValue('flex-direction');\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './test-api';\n"],"names":[],"mappings":";;;AAWM,MAAO,qBAAsB,SAAQ,qBAAqB,CAAA;AAAhE,IAAA,WAAA,GAAA;;AAEC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;AAEhC,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;AACtD,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,eAAe;IAiC7C;aArCQ,IAAA,CAAA,YAAY,GAAG,sBAAH,CAA0B;AAM7C;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAEV,OAAA,GAAwC,EAAE,EAAA;QAE1C,OAAO,qBAAqB,CAAC;AAC3B,aAAA,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO;aAClB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KACjD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAClC;IAC1B;AAEA,IAAA,MAAM,KAAK,GAAA;AACV,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE;QAC5C,OAAO,CAAC,KAAK,EAAE;IAChB;IAEA,MAAM,gBAAgB,CAAC,IAAY,EAAA;AAClC,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE;AAC5C,QAAA,OAAO,OAAO,CAAC,WA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