ngx-com 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/fesm2022/ngx-com-components-alert-testing.mjs +80 -0
  2. package/fesm2022/ngx-com-components-alert-testing.mjs.map +1 -0
  3. package/fesm2022/ngx-com-components-calendar-testing.mjs +157 -0
  4. package/fesm2022/ngx-com-components-calendar-testing.mjs.map +1 -0
  5. package/fesm2022/ngx-com-components-carousel-testing.mjs +121 -0
  6. package/fesm2022/ngx-com-components-carousel-testing.mjs.map +1 -0
  7. package/fesm2022/ngx-com-components-checkbox-testing.mjs +113 -0
  8. package/fesm2022/ngx-com-components-checkbox-testing.mjs.map +1 -0
  9. package/fesm2022/ngx-com-components-code-block-testing.mjs +88 -0
  10. package/fesm2022/ngx-com-components-code-block-testing.mjs.map +1 -0
  11. package/fesm2022/ngx-com-components-collapsible-testing.mjs +104 -0
  12. package/fesm2022/ngx-com-components-collapsible-testing.mjs.map +1 -0
  13. package/fesm2022/ngx-com-components-confirm-testing.mjs +150 -0
  14. package/fesm2022/ngx-com-components-confirm-testing.mjs.map +1 -0
  15. package/fesm2022/ngx-com-components-datepicker-testing.mjs +137 -0
  16. package/fesm2022/ngx-com-components-datepicker-testing.mjs.map +1 -0
  17. package/fesm2022/ngx-com-components-dialog-testing.mjs +109 -0
  18. package/fesm2022/ngx-com-components-dialog-testing.mjs.map +1 -0
  19. package/fesm2022/ngx-com-components-dialog.mjs +18 -18
  20. package/fesm2022/ngx-com-components-dialog.mjs.map +1 -1
  21. package/fesm2022/ngx-com-components-dropdown.mjs +39 -0
  22. package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
  23. package/fesm2022/ngx-com-components-form-field-testing.mjs +140 -0
  24. package/fesm2022/ngx-com-components-form-field-testing.mjs.map +1 -0
  25. package/fesm2022/ngx-com-components-form-field.mjs +5 -1
  26. package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
  27. package/fesm2022/ngx-com-components-menu-testing.mjs +298 -0
  28. package/fesm2022/ngx-com-components-menu-testing.mjs.map +1 -0
  29. package/fesm2022/ngx-com-components-paginator-testing.mjs +128 -0
  30. package/fesm2022/ngx-com-components-paginator-testing.mjs.map +1 -0
  31. package/fesm2022/ngx-com-components-popover-testing.mjs +115 -0
  32. package/fesm2022/ngx-com-components-popover-testing.mjs.map +1 -0
  33. package/fesm2022/ngx-com-components-radio-testing.mjs +157 -0
  34. package/fesm2022/ngx-com-components-radio-testing.mjs.map +1 -0
  35. package/fesm2022/ngx-com-components-segmented-control-testing.mjs +122 -0
  36. package/fesm2022/ngx-com-components-segmented-control-testing.mjs.map +1 -0
  37. package/fesm2022/ngx-com-components-sort-testing.mjs +108 -0
  38. package/fesm2022/ngx-com-components-sort-testing.mjs.map +1 -0
  39. package/fesm2022/ngx-com-components-switch-testing.mjs +103 -0
  40. package/fesm2022/ngx-com-components-switch-testing.mjs.map +1 -0
  41. package/fesm2022/ngx-com-components-table-testing.mjs +198 -0
  42. package/fesm2022/ngx-com-components-table-testing.mjs.map +1 -0
  43. package/fesm2022/ngx-com-components-tabs-testing.mjs +126 -0
  44. package/fesm2022/ngx-com-components-tabs-testing.mjs.map +1 -0
  45. package/fesm2022/ngx-com-components-timepicker-testing.mjs +117 -0
  46. package/fesm2022/ngx-com-components-timepicker-testing.mjs.map +1 -0
  47. package/fesm2022/ngx-com-components-toast-testing.mjs +172 -0
  48. package/fesm2022/ngx-com-components-toast-testing.mjs.map +1 -0
  49. package/fesm2022/ngx-com-components-toast.mjs +4 -4
  50. package/fesm2022/ngx-com-components-toast.mjs.map +1 -1
  51. package/fesm2022/ngx-com-components-tooltip-testing.mjs +117 -0
  52. package/fesm2022/ngx-com-components-tooltip-testing.mjs.map +1 -0
  53. package/package.json +89 -1
  54. package/types/ngx-com-components-alert-testing.d.ts +41 -0
  55. package/types/ngx-com-components-calendar-testing.d.ts +80 -0
  56. package/types/ngx-com-components-carousel-testing.d.ts +51 -0
  57. package/types/ngx-com-components-checkbox-testing.d.ts +56 -0
  58. package/types/ngx-com-components-code-block-testing.d.ts +45 -0
  59. package/types/ngx-com-components-collapsible-testing.d.ts +53 -0
  60. package/types/ngx-com-components-confirm-testing.d.ts +78 -0
  61. package/types/ngx-com-components-datepicker-testing.d.ts +61 -0
  62. package/types/ngx-com-components-dialog-testing.d.ts +57 -0
  63. package/types/ngx-com-components-dropdown.d.ts +12 -0
  64. package/types/ngx-com-components-form-field-testing.d.ts +61 -0
  65. package/types/ngx-com-components-menu-testing.d.ts +167 -0
  66. package/types/ngx-com-components-paginator-testing.d.ts +58 -0
  67. package/types/ngx-com-components-popover-testing.d.ts +63 -0
  68. package/types/ngx-com-components-radio-testing.d.ts +86 -0
  69. package/types/ngx-com-components-segmented-control-testing.d.ts +66 -0
  70. package/types/ngx-com-components-sort-testing.d.ts +62 -0
  71. package/types/ngx-com-components-switch-testing.d.ts +52 -0
  72. package/types/ngx-com-components-table-testing.d.ts +124 -0
  73. package/types/ngx-com-components-tabs-testing.d.ts +67 -0
  74. package/types/ngx-com-components-timepicker-testing.d.ts +53 -0
  75. package/types/ngx-com-components-toast-testing.d.ts +93 -0
  76. package/types/ngx-com-components-tooltip-testing.d.ts +57 -0
@@ -0,0 +1,157 @@
1
+ import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with a radio button in tests.
5
+ */
6
+ class ComRadioButtonHarness extends ComponentHarness {
7
+ static hostSelector = 'com-radio';
8
+ label = this.locatorFor('label');
9
+ input = this.locatorFor('input[type="radio"]');
10
+ labelText = this.locatorFor('.com-radio__label');
11
+ /**
12
+ * Gets a HarnessPredicate for matching radio buttons.
13
+ * @param options Filter options.
14
+ */
15
+ static with(options = {}) {
16
+ return new HarnessPredicate(ComRadioButtonHarness, options)
17
+ .addOption('label', options.label, async (harness, label) => {
18
+ const text = await harness.getLabelText();
19
+ return HarnessPredicate.stringMatches(text, label);
20
+ })
21
+ .addOption('value', options.value, async (harness, value) => {
22
+ const val = await harness.getValue();
23
+ return HarnessPredicate.stringMatches(val, value);
24
+ })
25
+ .addOption('disabled', options.disabled, async (harness, disabled) => {
26
+ return (await harness.isDisabled()) === disabled;
27
+ })
28
+ .addOption('checked', options.checked, async (harness, checked) => {
29
+ return (await harness.isChecked()) === checked;
30
+ });
31
+ }
32
+ /** Whether the radio button is checked. */
33
+ async isChecked() {
34
+ const inputEl = await this.input();
35
+ return inputEl.getProperty('checked');
36
+ }
37
+ /** Whether the radio button is disabled. */
38
+ async isDisabled() {
39
+ const inputEl = await this.input();
40
+ return inputEl.getProperty('disabled');
41
+ }
42
+ /** Gets the radio button's label text. */
43
+ async getLabelText() {
44
+ const el = await this.labelText();
45
+ return el.text();
46
+ }
47
+ /** Gets the radio button's value. */
48
+ async getValue() {
49
+ const inputEl = await this.input();
50
+ return inputEl.getProperty('value');
51
+ }
52
+ /** Checks the radio button if it is not already checked. */
53
+ async check() {
54
+ if (!(await this.isChecked())) {
55
+ const labelEl = await this.label();
56
+ return labelEl.click();
57
+ }
58
+ }
59
+ /** Focuses the radio button's input. */
60
+ async focus() {
61
+ const inputEl = await this.input();
62
+ return inputEl.focus();
63
+ }
64
+ /** Blurs the radio button's input. */
65
+ async blur() {
66
+ const inputEl = await this.input();
67
+ return inputEl.blur();
68
+ }
69
+ /** Whether the radio button's input is focused. */
70
+ async isFocused() {
71
+ const inputEl = await this.input();
72
+ return inputEl.isFocused();
73
+ }
74
+ }
75
+ /**
76
+ * Harness for interacting with a radio group in tests.
77
+ */
78
+ class ComRadioGroupHarness extends ComponentHarness {
79
+ static hostSelector = 'com-radio-group';
80
+ radioGroup = this.locatorFor('[role="radiogroup"]');
81
+ errorMessage = this.locatorForOptional('.com-radio-group__error');
82
+ /**
83
+ * Gets a HarnessPredicate for matching radio groups.
84
+ * @param options Filter options.
85
+ */
86
+ static with(options = {}) {
87
+ return new HarnessPredicate(ComRadioGroupHarness, options)
88
+ .addOption('name', options.name, async (harness, name) => {
89
+ const groupName = await harness.getName();
90
+ return HarnessPredicate.stringMatches(groupName, name);
91
+ })
92
+ .addOption('disabled', options.disabled, async (harness, disabled) => {
93
+ return (await harness.isDisabled()) === disabled;
94
+ });
95
+ }
96
+ /** Gets all radio buttons in the group, optionally filtered. */
97
+ async getRadioButtons(filters = {}) {
98
+ return this.locatorForAll(ComRadioButtonHarness.with(filters))();
99
+ }
100
+ /** Gets the checked radio button, or null if none is checked. */
101
+ async getCheckedRadioButton() {
102
+ const buttons = await this.getRadioButtons({ checked: true });
103
+ return buttons[0] ?? null;
104
+ }
105
+ /** Gets the value of the checked radio button, or null if none is checked. */
106
+ async getCheckedValue() {
107
+ const checked = await this.getCheckedRadioButton();
108
+ return checked ? checked.getValue() : null;
109
+ }
110
+ /** Gets the name attribute of the radio group from the first radio input. */
111
+ async getName() {
112
+ const firstInput = await this.locatorForOptional('input[type="radio"]')();
113
+ return firstInput ? firstInput.getAttribute('name') : null;
114
+ }
115
+ /** Whether the radio group is disabled. */
116
+ async isDisabled() {
117
+ const host = await this.host();
118
+ return host.hasClass('com-radio-group--disabled');
119
+ }
120
+ /** Whether the radio group is required. */
121
+ async isRequired() {
122
+ const groupEl = await this.radioGroup();
123
+ return (await groupEl.getAttribute('aria-required')) === 'true';
124
+ }
125
+ /** Whether the radio group has an error state. */
126
+ async hasError() {
127
+ const host = await this.host();
128
+ return host.hasClass('com-radio-group--error');
129
+ }
130
+ /** Gets the error message text, or null if no error is displayed. */
131
+ async getErrorMessage() {
132
+ const errorEl = await this.errorMessage();
133
+ return errorEl ? errorEl.text() : null;
134
+ }
135
+ /** Gets the aria-label of the radio group. */
136
+ async getAriaLabel() {
137
+ const groupEl = await this.radioGroup();
138
+ return groupEl.getAttribute('aria-label');
139
+ }
140
+ /** Checks a radio button matching the given filter. */
141
+ async checkRadioButton(filter = {}) {
142
+ const buttons = await this.getRadioButtons(filter);
143
+ if (buttons.length === 0) {
144
+ throw new Error(`Could not find radio button matching filter: ${JSON.stringify(filter)}`);
145
+ }
146
+ return buttons[0].check();
147
+ }
148
+ }
149
+
150
+ // Testing utilities for the radio component
151
+
152
+ /**
153
+ * Generated bundle index. Do not edit.
154
+ */
155
+
156
+ export { ComRadioButtonHarness, ComRadioGroupHarness };
157
+ //# sourceMappingURL=ngx-com-components-radio-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-radio-testing.mjs","sources":["../../../projects/com/components/radio/testing/radio.harness.ts","../../../projects/com/components/radio/testing/index.ts","../../../projects/com/components/radio/testing/ngx-com-components-radio-testing.ts"],"sourcesContent":["import {\n ComponentHarness,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport type { BaseHarnessFilters } from '@angular/cdk/testing';\n\n/** Harness filters for ComRadioButtonHarness. */\nexport interface ComRadioButtonHarnessFilters extends BaseHarnessFilters {\n /** Filter by the radio button's label text. */\n label?: string | RegExp;\n /** Filter by the radio button's value. */\n value?: string | RegExp;\n /** Filter by whether the radio button is disabled. */\n disabled?: boolean;\n /** Filter by whether the radio button is checked. */\n checked?: boolean;\n}\n\n/** Harness filters for ComRadioGroupHarness. */\nexport interface ComRadioGroupHarnessFilters extends BaseHarnessFilters {\n /** Filter by the radio group's name. */\n name?: string | RegExp;\n /** Filter by whether the radio group is disabled. */\n disabled?: boolean;\n}\n\n/**\n * Harness for interacting with a radio button in tests.\n */\nexport class ComRadioButtonHarness extends ComponentHarness {\n static hostSelector = 'com-radio';\n\n private readonly label = this.locatorFor('label');\n private readonly input = this.locatorFor('input[type=\"radio\"]');\n private readonly labelText = this.locatorFor('.com-radio__label');\n\n /**\n * Gets a HarnessPredicate for matching radio buttons.\n * @param options Filter options.\n */\n static with(options: ComRadioButtonHarnessFilters = {}): HarnessPredicate<ComRadioButtonHarness> {\n return new HarnessPredicate(ComRadioButtonHarness, options)\n .addOption('label', options.label, async (harness, label) => {\n const text = await harness.getLabelText();\n return HarnessPredicate.stringMatches(text, label);\n })\n .addOption('value', options.value, async (harness, value) => {\n const val = await harness.getValue();\n return HarnessPredicate.stringMatches(val, value);\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n })\n .addOption('checked', options.checked, async (harness, checked) => {\n return (await harness.isChecked()) === checked;\n });\n }\n\n /** Whether the radio button is checked. */\n async isChecked(): Promise<boolean> {\n const inputEl = await this.input();\n return inputEl.getProperty<boolean>('checked');\n }\n\n /** Whether the radio button is disabled. */\n async isDisabled(): Promise<boolean> {\n const inputEl = await this.input();\n return inputEl.getProperty<boolean>('disabled');\n }\n\n /** Gets the radio button's label text. */\n async getLabelText(): Promise<string> {\n const el = await this.labelText();\n return el.text();\n }\n\n /** Gets the radio button's value. */\n async getValue(): Promise<string> {\n const inputEl = await this.input();\n return inputEl.getProperty<string>('value');\n }\n\n /** Checks the radio button if it is not already checked. */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n const labelEl = await this.label();\n return labelEl.click();\n }\n }\n\n /** Focuses the radio button's input. */\n async focus(): Promise<void> {\n const inputEl = await this.input();\n return inputEl.focus();\n }\n\n /** Blurs the radio button's input. */\n async blur(): Promise<void> {\n const inputEl = await this.input();\n return inputEl.blur();\n }\n\n /** Whether the radio button's input is focused. */\n async isFocused(): Promise<boolean> {\n const inputEl = await this.input();\n return inputEl.isFocused();\n }\n}\n\n/**\n * Harness for interacting with a radio group in tests.\n */\nexport class ComRadioGroupHarness extends ComponentHarness {\n static hostSelector = 'com-radio-group';\n\n private readonly radioGroup = this.locatorFor('[role=\"radiogroup\"]');\n private readonly errorMessage = this.locatorForOptional('.com-radio-group__error');\n\n /**\n * Gets a HarnessPredicate for matching radio groups.\n * @param options Filter options.\n */\n static with(options: ComRadioGroupHarnessFilters = {}): HarnessPredicate<ComRadioGroupHarness> {\n return new HarnessPredicate(ComRadioGroupHarness, options)\n .addOption('name', options.name, async (harness, name) => {\n const groupName = await harness.getName();\n return HarnessPredicate.stringMatches(groupName, name);\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\n }\n\n /** Gets all radio buttons in the group, optionally filtered. */\n async getRadioButtons(filters: ComRadioButtonHarnessFilters = {}): Promise<ComRadioButtonHarness[]> {\n return this.locatorForAll(ComRadioButtonHarness.with(filters))();\n }\n\n /** Gets the checked radio button, or null if none is checked. */\n async getCheckedRadioButton(): Promise<ComRadioButtonHarness | null> {\n const buttons = await this.getRadioButtons({ checked: true });\n return buttons[0] ?? null;\n }\n\n /** Gets the value of the checked radio button, or null if none is checked. */\n async getCheckedValue(): Promise<string | null> {\n const checked = await this.getCheckedRadioButton();\n return checked ? checked.getValue() : null;\n }\n\n /** Gets the name attribute of the radio group from the first radio input. */\n async getName(): Promise<string | null> {\n const firstInput = await this.locatorForOptional('input[type=\"radio\"]')();\n return firstInput ? firstInput.getAttribute('name') : null;\n }\n\n /** Whether the radio group is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return host.hasClass('com-radio-group--disabled');\n }\n\n /** Whether the radio group is required. */\n async isRequired(): Promise<boolean> {\n const groupEl = await this.radioGroup();\n return (await groupEl.getAttribute('aria-required')) === 'true';\n }\n\n /** Whether the radio group has an error state. */\n async hasError(): Promise<boolean> {\n const host = await this.host();\n return host.hasClass('com-radio-group--error');\n }\n\n /** Gets the error message text, or null if no error is displayed. */\n async getErrorMessage(): Promise<string | null> {\n const errorEl = await this.errorMessage();\n return errorEl ? errorEl.text() : null;\n }\n\n /** Gets the aria-label of the radio group. */\n async getAriaLabel(): Promise<string | null> {\n const groupEl = await this.radioGroup();\n return groupEl.getAttribute('aria-label');\n }\n\n /** Checks a radio button matching the given filter. */\n async checkRadioButton(filter: ComRadioButtonHarnessFilters = {}): Promise<void> {\n const buttons = await this.getRadioButtons(filter);\n if (buttons.length === 0) {\n throw new Error(`Could not find radio button matching filter: ${JSON.stringify(filter)}`);\n }\n return buttons[0]!.check();\n }\n}\n","// Testing utilities for the radio component\n\nexport {\n ComRadioButtonHarness,\n ComRadioGroupHarness,\n} from './radio.harness';\n\nexport type {\n ComRadioButtonHarnessFilters,\n ComRadioGroupHarnessFilters,\n} from './radio.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AA0BA;;AAEG;AACG,MAAO,qBAAsB,SAAQ,gBAAgB,CAAA;AACzD,IAAA,OAAO,YAAY,GAAG,WAAW;AAEhB,IAAA,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;AAChC,IAAA,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC;AAC9C,IAAA,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;AAEjE;;;AAGG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAwC,EAAE,EAAA;AACpD,QAAA,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO;AACvD,aAAA,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,OAAO,EAAE,KAAK,KAAI;AAC1D,YAAA,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,YAAY,EAAE;YACzC,OAAO,gBAAgB,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC;AACpD,QAAA,CAAC;AACA,aAAA,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,OAAO,EAAE,KAAK,KAAI;AAC1D,YAAA,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;YACpC,OAAO,gBAAgB,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC;AACnD,QAAA,CAAC;AACA,aAAA,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAI;YACnE,OAAO,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ;AAClD,QAAA,CAAC;AACA,aAAA,SAAS,CAAC,SAAS,EAAE,OAAO,CA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O,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;AAClD,QAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;AACxB,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,6CAAA,EAAgD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA,CAAE,CAAC;QAC3F;AACA,QAAA,OAAO,OAAO,CAAC,CAAC,CAAE,CAAC,KAAK,EAAE;IAC5B;;;ACjMF;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,122 @@
1
+ import { ComponentHarness, HarnessPredicate, parallel } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with an individual segment button in tests.
5
+ */
6
+ class ComSegmentHarness extends ComponentHarness {
7
+ static hostSelector = 'button[role="radio"]';
8
+ /**
9
+ * Gets a HarnessPredicate for matching segments.
10
+ * @param options Filter options.
11
+ */
12
+ static with(options = {}) {
13
+ return new HarnessPredicate(ComSegmentHarness, options)
14
+ .addOption('label', options.label, async (harness, label) => {
15
+ const text = await harness.getLabel();
16
+ return HarnessPredicate.stringMatches(text, label);
17
+ })
18
+ .addOption('selected', options.selected, async (harness, selected) => {
19
+ return (await harness.isSelected()) === selected;
20
+ })
21
+ .addOption('disabled', options.disabled, async (harness, disabled) => {
22
+ return (await harness.isDisabled()) === disabled;
23
+ });
24
+ }
25
+ /** Gets the segment's label text. Uses aria-label if present, otherwise text content. */
26
+ async getLabel() {
27
+ const host = await this.host();
28
+ const ariaLabel = await host.getAttribute('aria-label');
29
+ if (ariaLabel) {
30
+ return ariaLabel;
31
+ }
32
+ return host.text();
33
+ }
34
+ /** Whether the segment is currently selected. */
35
+ async isSelected() {
36
+ const host = await this.host();
37
+ return (await host.getAttribute('aria-checked')) === 'true';
38
+ }
39
+ /** Whether the segment is disabled. */
40
+ async isDisabled() {
41
+ const host = await this.host();
42
+ return (await host.getAttribute('aria-disabled')) === 'true' ||
43
+ (await host.getProperty('disabled'));
44
+ }
45
+ /** Clicks the segment to select it. Throws if disabled. */
46
+ async select() {
47
+ if (await this.isDisabled()) {
48
+ throw new Error('Cannot select a disabled segment');
49
+ }
50
+ const host = await this.host();
51
+ return host.click();
52
+ }
53
+ /** Focuses the segment button. */
54
+ async focus() {
55
+ const host = await this.host();
56
+ return host.focus();
57
+ }
58
+ /** Blurs the segment button. */
59
+ async blur() {
60
+ const host = await this.host();
61
+ return host.blur();
62
+ }
63
+ /** Whether the segment button is focused. */
64
+ async isFocused() {
65
+ const host = await this.host();
66
+ return host.isFocused();
67
+ }
68
+ }
69
+ /**
70
+ * Harness for interacting with a ComSegmentedControl in tests.
71
+ */
72
+ class ComSegmentedControlHarness extends ComponentHarness {
73
+ static hostSelector = 'com-segmented-control';
74
+ radioGroup = this.locatorFor('div[role="radiogroup"]');
75
+ /**
76
+ * Gets a HarnessPredicate for matching segmented controls.
77
+ * @param options Filter options.
78
+ */
79
+ static with(options = {}) {
80
+ return new HarnessPredicate(ComSegmentedControlHarness, options)
81
+ .addOption('ariaLabel', options.ariaLabel, async (harness, ariaLabel) => {
82
+ const label = await harness.getAriaLabel();
83
+ return HarnessPredicate.stringMatches(label, ariaLabel);
84
+ });
85
+ }
86
+ /** Gets all segment buttons, optionally filtered. */
87
+ async getSegments(filters = {}) {
88
+ return this.locatorForAll(ComSegmentHarness.with(filters))();
89
+ }
90
+ /** Gets the currently selected segment, or null if none is selected. */
91
+ async getSelectedSegment() {
92
+ const segments = await this.getSegments({ selected: true });
93
+ return segments[0] ?? null;
94
+ }
95
+ /** Selects a segment matching the given filter. */
96
+ async selectSegment(filter) {
97
+ const segments = await this.getSegments(filter);
98
+ if (segments.length === 0) {
99
+ throw new Error(`Could not find segment matching filter: ${JSON.stringify(filter)}`);
100
+ }
101
+ return segments[0].select();
102
+ }
103
+ /** Gets all segment label texts. */
104
+ async getSegmentLabels() {
105
+ const segments = await this.getSegments();
106
+ return parallel(() => segments.map((s) => s.getLabel()));
107
+ }
108
+ /** Gets the radiogroup's aria-label. */
109
+ async getAriaLabel() {
110
+ const group = await this.radioGroup();
111
+ return group.getAttribute('aria-label');
112
+ }
113
+ }
114
+
115
+ // Testing utilities for the segmented-control component
116
+
117
+ /**
118
+ * Generated bundle index. Do not edit.
119
+ */
120
+
121
+ export { ComSegmentHarness, ComSegmentedControlHarness };
122
+ //# sourceMappingURL=ngx-com-components-segmented-control-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-segmented-control-testing.mjs","sources":["../../../projects/com/components/segmented-control/testing/segmented-control.harness.ts","../../../projects/com/components/segmented-control/testing/index.ts","../../../projects/com/components/segmented-control/testing/ngx-com-components-segmented-control-testing.ts"],"sourcesContent":["import {\n ComponentHarness,\n HarnessPredicate,\n parallel,\n} from '@angular/cdk/testing';\nimport type { BaseHarnessFilters } from '@angular/cdk/testing';\n\n/** Harness filters for ComSegmentHarness. */\nexport interface ComSegmentHarnessFilters extends BaseHarnessFilters {\n /** Filter by the segment's label text. */\n label?: string | RegExp;\n /** Filter by whether the segment is selected. */\n selected?: boolean;\n /** Filter by whether the segment is disabled. */\n disabled?: boolean;\n}\n\n/** Harness filters for ComSegmentedControlHarness. */\nexport interface ComSegmentedControlHarnessFilters extends BaseHarnessFilters {\n /** Filter by the control's aria-label. */\n ariaLabel?: string | RegExp;\n}\n\n/**\n * Harness for interacting with an individual segment button in tests.\n */\nexport class ComSegmentHarness extends ComponentHarness {\n static hostSelector = 'button[role=\"radio\"]';\n\n /**\n * Gets a HarnessPredicate for matching segments.\n * @param options Filter options.\n */\n static with(options: ComSegmentHarnessFilters = {}): HarnessPredicate<ComSegmentHarness> {\n return new HarnessPredicate(ComSegmentHarness, options)\n .addOption('label', options.label, async (harness, label) => {\n const text = await harness.getLabel();\n return HarnessPredicate.stringMatches(text, label);\n })\n .addOption('selected', options.selected, async (harness, selected) => {\n return (await harness.isSelected()) === selected;\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\n }\n\n /** Gets the segment's label text. Uses aria-label if present, otherwise text content. */\n async getLabel(): Promise<string> {\n const host = await this.host();\n const ariaLabel = await host.getAttribute('aria-label');\n if (ariaLabel) {\n return ariaLabel;\n }\n return host.text();\n }\n\n /** Whether the segment is currently selected. */\n async isSelected(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-checked')) === 'true';\n }\n\n /** Whether the segment is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true' ||\n (await host.getProperty<boolean>('disabled'));\n }\n\n /** Clicks the segment to select it. Throws if disabled. */\n async select(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error('Cannot select a disabled segment');\n }\n const host = await this.host();\n return host.click();\n }\n\n /** Focuses the segment button. */\n async focus(): Promise<void> {\n const host = await this.host();\n return host.focus();\n }\n\n /** Blurs the segment button. */\n async blur(): Promise<void> {\n const host = await this.host();\n return host.blur();\n }\n\n /** Whether the segment button is focused. */\n async isFocused(): Promise<boolean> {\n const host = await this.host();\n return host.isFocused();\n }\n}\n\n/**\n * Harness for interacting with a ComSegmentedControl in tests.\n */\nexport class ComSegmentedControlHarness extends ComponentHarness {\n static hostSelector = 'com-segmented-control';\n\n private readonly radioGroup = this.locatorFor('div[role=\"radiogroup\"]');\n\n /**\n * Gets a HarnessPredicate for matching segmented controls.\n * @param options Filter options.\n */\n static with(options: ComSegmentedControlHarnessFilters = {}): HarnessPredicate<ComSegmentedControlHarness> {\n return new HarnessPredicate(ComSegmentedControlHarness, options)\n .addOption('ariaLabel', options.ariaLabel, async (harness, ariaLabel) => {\n const label = await harness.getAriaLabel();\n return HarnessPredicate.stringMatches(label, ariaLabel);\n });\n }\n\n /** Gets all segment buttons, optionally filtered. */\n async getSegments(filters: ComSegmentHarnessFilters = {}): Promise<ComSegmentHarness[]> {\n return this.locatorForAll(ComSegmentHarness.with(filters))();\n }\n\n /** Gets the currently selected segment, or null if none is selected. */\n async getSelectedSegment(): Promise<ComSegmentHarness | null> {\n const segments = await this.getSegments({ selected: true });\n return segments[0] ?? null;\n }\n\n /** Selects a segment matching the given filter. */\n async selectSegment(filter: ComSegmentHarnessFilters): Promise<void> {\n const segments = await this.getSegments(filter);\n if (segments.length === 0) {\n throw new Error(`Could not find segment matching filter: ${JSON.stringify(filter)}`);\n }\n return segments[0]!.select();\n }\n\n /** Gets all segment label texts. */\n async getSegmentLabels(): Promise<string[]> {\n const segments = await this.getSegments();\n return parallel(() => segments.map((s) => s.getLabel()));\n }\n\n /** Gets the radiogroup's aria-label. */\n async getAriaLabel(): Promise<string | null> {\n const group = await this.radioGroup();\n return group.getAttribute('aria-label');\n }\n}\n","// Testing utilities for the segmented-control component\n\nexport {\n ComSegmentHarness,\n ComSegmentedControlHarness,\n} from './segmented-control.harness';\n\nexport type {\n ComSegmentHarnessFilters,\n ComSegmentedControlHarnessFilters,\n} from './segmented-control.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAuBA;;AAEG;AACG,MAAO,iBAAkB,SAAQ,gBAAgB,CAAA;AACrD,IAAA,OAAO,YAAY,GAAG,sBAAsB;AAE5C;;;AAGG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAoC,EAAE,EAAA;AAChD,QAAA,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,EAAE,OAAO;AACnD,aAAA,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,OAAO,EAAE,KAAK,KAAI;AAC1D,YAAA,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;YACrC,OAAO,gBAAgB,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC;AACpD,QAAA,CAAC;AACA,aAAA,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAI;YACnE,OAAO,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ;AAClD,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,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;AAC/C,QAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACzB,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,wCAAA,EAA2C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA,CAAE,CAAC;QACtF;AACA,QAAA,OAAO,QAAQ,CAAC,CAAC,CAAE,CAAC,MAAM,EAAE;IAC9B;;AAGA,IAAA,MAAM,gBAAgB,GAAA;AACpB,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE;QACzC,OAAO,QAAQ,CAAC,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1D;;AAGA,IAAA,MAAM,YAAY,GAAA;AAChB,QAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE;AACrC,QAAA,OAAO,KAAK,CAAC,YAAY,CAAC,YAAY,CAAC;IACzC;;;ACpJF;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,108 @@
1
+ import { ComponentHarness, HarnessPredicate, parallel } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with a sort header in tests.
5
+ */
6
+ class ComSortHeaderHarness extends ComponentHarness {
7
+ static hostSelector = '[comSortHeader]';
8
+ /**
9
+ * Gets a HarnessPredicate for matching sort headers.
10
+ * @param options Filter options.
11
+ */
12
+ static with(options = {}) {
13
+ return new HarnessPredicate(ComSortHeaderHarness, options)
14
+ .addOption('label', options.label, async (harness, label) => {
15
+ const text = await harness.getLabel();
16
+ return HarnessPredicate.stringMatches(text, label);
17
+ })
18
+ .addOption('id', options.id, async (harness, id) => {
19
+ const headerId = await harness.getId();
20
+ return HarnessPredicate.stringMatches(headerId, id);
21
+ })
22
+ .addOption('sortDirection', options.sortDirection, async (harness, sortDirection) => {
23
+ return (await harness.getSortDirection()) === sortDirection;
24
+ });
25
+ }
26
+ /** Gets the header's text content. */
27
+ async getLabel() {
28
+ const host = await this.host();
29
+ return host.text();
30
+ }
31
+ /** Gets the column id (comSortHeader attribute value). */
32
+ async getId() {
33
+ const host = await this.host();
34
+ const id = await host.getAttribute('comSortHeader');
35
+ return id ?? '';
36
+ }
37
+ /** Gets the current sort direction from aria-sort. */
38
+ async getSortDirection() {
39
+ const host = await this.host();
40
+ const ariaSort = await host.getAttribute('aria-sort');
41
+ if (ariaSort === 'ascending' || ariaSort === 'descending') {
42
+ return ariaSort;
43
+ }
44
+ return 'none';
45
+ }
46
+ /** Whether this header is actively sorted (direction is not 'none'). */
47
+ async isActive() {
48
+ return (await this.getSortDirection()) !== 'none';
49
+ }
50
+ /** Whether this header is disabled. */
51
+ async isDisabled() {
52
+ const host = await this.host();
53
+ return (await host.getAttribute('aria-disabled')) === 'true';
54
+ }
55
+ /** Clicks the header to cycle sort direction. */
56
+ async click() {
57
+ const host = await this.host();
58
+ return host.click();
59
+ }
60
+ /** Focuses the header element. */
61
+ async focus() {
62
+ const host = await this.host();
63
+ return host.focus();
64
+ }
65
+ /** Blurs the header element. */
66
+ async blur() {
67
+ const host = await this.host();
68
+ return host.blur();
69
+ }
70
+ /** Whether the header element is focused. */
71
+ async isFocused() {
72
+ const host = await this.host();
73
+ return host.isFocused();
74
+ }
75
+ }
76
+ /**
77
+ * Harness for interacting with a sort container in tests.
78
+ */
79
+ class ComSortHarness extends ComponentHarness {
80
+ static hostSelector = '[comSort]';
81
+ /**
82
+ * Gets a HarnessPredicate for matching sort containers.
83
+ * @param options Filter options.
84
+ */
85
+ static with(options = {}) {
86
+ return new HarnessPredicate(ComSortHarness, options);
87
+ }
88
+ /** Gets all sort headers, optionally filtered. */
89
+ async getSortHeaders(filters = {}) {
90
+ return this.locatorForAll(ComSortHeaderHarness.with(filters))();
91
+ }
92
+ /** Gets the actively sorted header, or null if none is sorted. */
93
+ async getActiveHeader() {
94
+ const headers = await this.getSortHeaders();
95
+ const activeFlags = await parallel(() => headers.map((h) => h.isActive()));
96
+ const index = activeFlags.indexOf(true);
97
+ return index >= 0 ? headers[index] : null;
98
+ }
99
+ }
100
+
101
+ // Testing utilities for the sort component
102
+
103
+ /**
104
+ * Generated bundle index. Do not edit.
105
+ */
106
+
107
+ export { ComSortHarness, ComSortHeaderHarness };
108
+ //# sourceMappingURL=ngx-com-components-sort-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-sort-testing.mjs","sources":["../../../projects/com/components/sort/testing/sort.harness.ts","../../../projects/com/components/sort/testing/index.ts","../../../projects/com/components/sort/testing/ngx-com-components-sort-testing.ts"],"sourcesContent":["import {\n ComponentHarness,\n HarnessPredicate,\n parallel,\n} from '@angular/cdk/testing';\nimport type { BaseHarnessFilters } from '@angular/cdk/testing';\n\n/** Sort direction as exposed by the aria-sort attribute. */\nexport type SortHeaderSortDirection = 'ascending' | 'descending' | 'none';\n\n/** Harness filters for ComSortHeaderHarness. */\nexport interface ComSortHeaderHarnessFilters extends BaseHarnessFilters {\n /** Filter by the header's text content. */\n label?: string | RegExp;\n /** Filter by the column id (comSortHeader attribute value). */\n id?: string | RegExp;\n /** Filter by the current sort direction. */\n sortDirection?: SortHeaderSortDirection;\n}\n\n/** Harness filters for ComSortHarness. */\nexport type ComSortHarnessFilters = BaseHarnessFilters;\n\n/**\n * Harness for interacting with a sort header in tests.\n */\nexport class ComSortHeaderHarness extends ComponentHarness {\n static hostSelector = '[comSortHeader]';\n\n /**\n * Gets a HarnessPredicate for matching sort headers.\n * @param options Filter options.\n */\n static with(options: ComSortHeaderHarnessFilters = {}): HarnessPredicate<ComSortHeaderHarness> {\n return new HarnessPredicate(ComSortHeaderHarness, options)\n .addOption('label', options.label, async (harness, label) => {\n const text = await harness.getLabel();\n return HarnessPredicate.stringMatches(text, label);\n })\n .addOption('id', options.id, async (harness, id) => {\n const headerId = await harness.getId();\n return HarnessPredicate.stringMatches(headerId, id);\n })\n .addOption('sortDirection', options.sortDirection, async (harness, sortDirection) => {\n return (await harness.getSortDirection()) === sortDirection;\n });\n }\n\n /** Gets the header's text content. */\n async getLabel(): Promise<string> {\n const host = await this.host();\n return host.text();\n }\n\n /** Gets the column id (comSortHeader attribute value). */\n async getId(): Promise<string> {\n const host = await this.host();\n const id = await host.getAttribute('comSortHeader');\n return id ?? '';\n }\n\n /** Gets the current sort direction from aria-sort. */\n async getSortDirection(): Promise<SortHeaderSortDirection> {\n const host = await this.host();\n const ariaSort = await host.getAttribute('aria-sort');\n if (ariaSort === 'ascending' || ariaSort === 'descending') {\n return ariaSort;\n }\n return 'none';\n }\n\n /** Whether this header is actively sorted (direction is not 'none'). */\n async isActive(): Promise<boolean> {\n return (await this.getSortDirection()) !== 'none';\n }\n\n /** Whether this header is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Clicks the header to cycle sort direction. */\n async click(): Promise<void> {\n const host = await this.host();\n return host.click();\n }\n\n /** Focuses the header element. */\n async focus(): Promise<void> {\n const host = await this.host();\n return host.focus();\n }\n\n /** Blurs the header element. */\n async blur(): Promise<void> {\n const host = await this.host();\n return host.blur();\n }\n\n /** Whether the header element is focused. */\n async isFocused(): Promise<boolean> {\n const host = await this.host();\n return host.isFocused();\n }\n}\n\n/**\n * Harness for interacting with a sort container in tests.\n */\nexport class ComSortHarness extends ComponentHarness {\n static hostSelector = '[comSort]';\n\n /**\n * Gets a HarnessPredicate for matching sort containers.\n * @param options Filter options.\n */\n static with(options: ComSortHarnessFilters = {}): HarnessPredicate<ComSortHarness> {\n return new HarnessPredicate(ComSortHarness, options);\n }\n\n /** Gets all sort headers, optionally filtered. */\n async getSortHeaders(filters: ComSortHeaderHarnessFilters = {}): Promise<ComSortHeaderHarness[]> {\n return this.locatorForAll(ComSortHeaderHarness.with(filters))();\n }\n\n /** Gets the actively sorted header, or null if none is sorted. */\n async getActiveHeader(): Promise<ComSortHeaderHarness | null> {\n const headers = await this.getSortHeaders();\n const activeFlags = await parallel(() => headers.map((h) => h.isActive()));\n const index = activeFlags.indexOf(true);\n return index >= 0 ? headers[index]! : null;\n }\n}\n","// Testing utilities for the sort component\n\nexport {\n ComSortHarness,\n ComSortHeaderHarness,\n} from './sort.harness';\n\nexport type {\n SortHeaderSortDirection,\n ComSortHarnessFilters,\n ComSortHeaderHarnessFilters,\n} from './sort.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAuBA;;AAEG;AACG,MAAO,oBAAqB,SAAQ,gBAAgB,CAAA;AACxD,IAAA,OAAO,YAAY,GAAG,iBAAiB;AAEvC;;;AAGG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAuC,EAAE,EAAA;AACnD,QAAA,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO;AACtD,aAAA,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,OAAO,EAAE,KAAK,KAAI;AAC1D,YAAA,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;YACrC,OAAO,gBAAgB,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC;AACpD,QAAA,CAAC;AACA,aAAA,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,OAAO,EAAE,EAAE,KAAI;AACjD,YAAA,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE;YACtC,OAAO,gBAAgB,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAE,CAAC;AACrD,QAAA,CAAC;AACA,aAAA,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,aAAa,EAAE,OAAO,OAAO,EAAE,aAAa,KAAI;YAClF,OAAO,CAAC,MAAM,OAAO,CAAC,gBAAgB,EAAE,MAAM,aAAa;AAC7D,QAAA,CAAC,CAAC;IACN;;AAGA,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,IAAI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AAC,IAAI,EAAE;IACpB;;AAGA,IAAA,MAAM,SAAS,GAAA;AACb,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE;AAC9B,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE;IACzB;;AAGF;;AAEG;AACG,MAAO,cAAe,SAAQ,gBAAgB,CAAA;AAClD,IAAA,OAAO,YAAY,GAAG,WAAW;AAEjC;;;AAGG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAiC,EAAE,EAAA;AAC7C,QAAA,OAAO,IAAI,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC;IACtD;;AAGA,IAAA,MAAM,cAAc,CAAC,OAAA,GAAuC,EAAE,EAAA;AAC5D,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE;IACjE;;AAGA,IAAA,MAAM,eAAe,GAAA;AACnB,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE;QAC3C,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1E,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;AACvC,QAAA,OAAO,KAAK,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAE,GAAG,IAAI;IAC5C;;;ACpIF;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,103 @@
1
+ import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with a ComSwitch in tests.
5
+ */
6
+ class ComSwitchHarness extends ComponentHarness {
7
+ static hostSelector = 'com-switch';
8
+ label = this.locatorFor('label');
9
+ input = this.locatorFor('input[type="checkbox"][role="switch"]');
10
+ labelText = this.locatorFor('.com-switch__label');
11
+ /**
12
+ * Gets a HarnessPredicate for matching switches.
13
+ * @param options Filter options.
14
+ */
15
+ static with(options = {}) {
16
+ return new HarnessPredicate(ComSwitchHarness, options)
17
+ .addOption('label', options.label, async (harness, label) => {
18
+ const text = await harness.getLabelText();
19
+ return HarnessPredicate.stringMatches(text, label);
20
+ })
21
+ .addOption('disabled', options.disabled, async (harness, disabled) => {
22
+ return (await harness.isDisabled()) === disabled;
23
+ })
24
+ .addOption('checked', options.checked, async (harness, checked) => {
25
+ return (await harness.isChecked()) === checked;
26
+ });
27
+ }
28
+ /** Whether the switch is currently checked. */
29
+ async isChecked() {
30
+ const inputEl = await this.input();
31
+ return inputEl.getProperty('checked');
32
+ }
33
+ /** Whether the switch is disabled. */
34
+ async isDisabled() {
35
+ const inputEl = await this.input();
36
+ return inputEl.getProperty('disabled');
37
+ }
38
+ /** Whether the switch is required. */
39
+ async isRequired() {
40
+ const inputEl = await this.input();
41
+ const ariaRequired = await inputEl.getAttribute('aria-required');
42
+ if (ariaRequired !== null) {
43
+ return ariaRequired === 'true';
44
+ }
45
+ return inputEl.getProperty('required');
46
+ }
47
+ /** Gets the switch's label text. */
48
+ async getLabelText() {
49
+ const labelEl = await this.labelText();
50
+ return labelEl.text();
51
+ }
52
+ /** Gets the switch's name attribute. */
53
+ async getName() {
54
+ const inputEl = await this.input();
55
+ return inputEl.getAttribute('name');
56
+ }
57
+ /** Gets the switch's aria-label attribute. */
58
+ async getAriaLabel() {
59
+ const inputEl = await this.input();
60
+ return inputEl.getAttribute('aria-label');
61
+ }
62
+ /** Toggles the switch by clicking its label. */
63
+ async toggle() {
64
+ const labelEl = await this.label();
65
+ return labelEl.click();
66
+ }
67
+ /** Checks the switch if it is not already checked. */
68
+ async check() {
69
+ if (!(await this.isChecked())) {
70
+ await this.toggle();
71
+ }
72
+ }
73
+ /** Unchecks the switch if it is currently checked. */
74
+ async uncheck() {
75
+ if (await this.isChecked()) {
76
+ await this.toggle();
77
+ }
78
+ }
79
+ /** Focuses the switch's input element. */
80
+ async focus() {
81
+ const inputEl = await this.input();
82
+ return inputEl.focus();
83
+ }
84
+ /** Blurs the switch's input element. */
85
+ async blur() {
86
+ const inputEl = await this.input();
87
+ return inputEl.blur();
88
+ }
89
+ /** Whether the switch's input element is focused. */
90
+ async isFocused() {
91
+ const inputEl = await this.input();
92
+ return inputEl.isFocused();
93
+ }
94
+ }
95
+
96
+ // Testing utilities for the switch component
97
+
98
+ /**
99
+ * Generated bundle index. Do not edit.
100
+ */
101
+
102
+ export { ComSwitchHarness };
103
+ //# sourceMappingURL=ngx-com-components-switch-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-switch-testing.mjs","sources":["../../../projects/com/components/switch/testing/switch.harness.ts","../../../projects/com/components/switch/testing/index.ts","../../../projects/com/components/switch/testing/ngx-com-components-switch-testing.ts"],"sourcesContent":["import {\n ComponentHarness,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport type { BaseHarnessFilters } from '@angular/cdk/testing';\n\n/** Harness filters for ComSwitchHarness. */\nexport interface ComSwitchHarnessFilters extends BaseHarnessFilters {\n /** Filter by the switch's label text. */\n label?: string | RegExp;\n /** Filter by whether the switch is disabled. */\n disabled?: boolean;\n /** Filter by whether the switch is checked. */\n checked?: boolean;\n}\n\n/**\n * Harness for interacting with a ComSwitch in tests.\n */\nexport class ComSwitchHarness extends ComponentHarness {\n static hostSelector = 'com-switch';\n\n private readonly label = this.locatorFor('label');\n private readonly input = this.locatorFor('input[type=\"checkbox\"][role=\"switch\"]');\n private readonly labelText = this.locatorFor('.com-switch__label');\n\n /**\n * Gets a HarnessPredicate for matching switches.\n * @param options Filter options.\n */\n static with(options: ComSwitchHarnessFilters = {}): HarnessPredicate<ComSwitchHarness> {\n return new HarnessPredicate(ComSwitchHarness, options)\n .addOption('label', options.label, async (harness, label) => {\n const text = await harness.getLabelText();\n return HarnessPredicate.stringMatches(text, label);\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n })\n .addOption('checked', options.checked, async (harness, checked) => {\n return (await harness.isChecked()) === checked;\n });\n }\n\n /** Whether the switch is currently checked. */\n async isChecked(): Promise<boolean> {\n const inputEl = await this.input();\n return inputEl.getProperty<boolean>('checked');\n }\n\n /** Whether the switch is disabled. */\n async isDisabled(): Promise<boolean> {\n const inputEl = await this.input();\n return inputEl.getProperty<boolean>('disabled');\n }\n\n /** Whether the switch is required. */\n async isRequired(): Promise<boolean> {\n const inputEl = await this.input();\n const ariaRequired = await inputEl.getAttribute('aria-required');\n if (ariaRequired !== null) {\n return ariaRequired === 'true';\n }\n return inputEl.getProperty<boolean>('required');\n }\n\n /** Gets the switch's label text. */\n async getLabelText(): Promise<string> {\n const labelEl = await this.labelText();\n return labelEl.text();\n }\n\n /** Gets the switch's name attribute. */\n async getName(): Promise<string | null> {\n const inputEl = await this.input();\n return inputEl.getAttribute('name');\n }\n\n /** Gets the switch's aria-label attribute. */\n async getAriaLabel(): Promise<string | null> {\n const inputEl = await this.input();\n return inputEl.getAttribute('aria-label');\n }\n\n /** Toggles the switch by clicking its label. */\n async toggle(): Promise<void> {\n const labelEl = await this.label();\n return labelEl.click();\n }\n\n /** Checks the switch if it is not already checked. */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n await this.toggle();\n }\n }\n\n /** Unchecks the switch if it is currently checked. */\n async uncheck(): Promise<void> {\n if (await this.isChecked()) {\n await this.toggle();\n }\n }\n\n /** Focuses the switch's input element. */\n async focus(): Promise<void> {\n const inputEl = await this.input();\n return inputEl.focus();\n }\n\n /** Blurs the switch's input element. */\n async blur(): Promise<void> {\n const inputEl = await this.input();\n return inputEl.blur();\n }\n\n /** Whether the switch's input element is focused. */\n async isFocused(): Promise<boolean> {\n const inputEl = await this.input();\n return inputEl.isFocused();\n }\n}\n","// Testing utilities for the switch component\n\nexport { ComSwitchHarness } from './switch.harness';\n\nexport type { ComSwitchHarnessFilters } from './switch.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names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