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,104 @@
1
+ import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with a ComCollapsible in tests.
5
+ */
6
+ class ComCollapsibleHarness extends ComponentHarness {
7
+ static hostSelector = '[comCollapsible]';
8
+ trigger = this.locatorFor('[comCollapsibleTrigger]');
9
+ content = this.locatorFor('com-collapsible-content');
10
+ /**
11
+ * Gets a HarnessPredicate for matching collapsibles.
12
+ * @param options Filter options.
13
+ */
14
+ static with(options = {}) {
15
+ return new HarnessPredicate(ComCollapsibleHarness, options)
16
+ .addOption('expanded', options.expanded, async (harness, expanded) => {
17
+ return (await harness.isExpanded()) === expanded;
18
+ })
19
+ .addOption('disabled', options.disabled, async (harness, disabled) => {
20
+ return (await harness.isDisabled()) === disabled;
21
+ });
22
+ }
23
+ /** Whether the collapsible is currently expanded. */
24
+ async isExpanded() {
25
+ const triggerEl = await this.trigger();
26
+ return (await triggerEl.getAttribute('aria-expanded')) === 'true';
27
+ }
28
+ /** Whether the collapsible is disabled. */
29
+ async isDisabled() {
30
+ const triggerEl = await this.trigger();
31
+ return (await triggerEl.getAttribute('aria-disabled')) === 'true';
32
+ }
33
+ /** Toggles the collapsible by clicking the trigger. */
34
+ async toggle() {
35
+ const triggerEl = await this.trigger();
36
+ return triggerEl.click();
37
+ }
38
+ /** Expands the collapsible if it is currently collapsed. */
39
+ async expand() {
40
+ if (!(await this.isExpanded())) {
41
+ await this.toggle();
42
+ }
43
+ }
44
+ /** Collapses the collapsible if it is currently expanded. */
45
+ async collapse() {
46
+ if (await this.isExpanded()) {
47
+ await this.toggle();
48
+ }
49
+ }
50
+ /** Gets the text content of the trigger element. */
51
+ async getTriggerText() {
52
+ const triggerEl = await this.trigger();
53
+ return triggerEl.text();
54
+ }
55
+ /** Gets the text content of the content element. */
56
+ async getContentText() {
57
+ const contentEl = await this.content();
58
+ return contentEl.text();
59
+ }
60
+ /** Gets the role attribute of the content element. */
61
+ async getContentRole() {
62
+ const contentEl = await this.content();
63
+ return contentEl.getAttribute('role');
64
+ }
65
+ /** Gets the aria-controls attribute from the trigger. */
66
+ async getAriaControls() {
67
+ const triggerEl = await this.trigger();
68
+ return triggerEl.getAttribute('aria-controls');
69
+ }
70
+ /** Gets the aria-labelledby attribute from the content. */
71
+ async getAriaLabelledby() {
72
+ const contentEl = await this.content();
73
+ return contentEl.getAttribute('aria-labelledby');
74
+ }
75
+ /** Whether the content element has the inert attribute. */
76
+ async isContentInert() {
77
+ const contentEl = await this.content();
78
+ return (await contentEl.getAttribute('inert')) !== null;
79
+ }
80
+ /** Focuses the trigger element. */
81
+ async focus() {
82
+ const triggerEl = await this.trigger();
83
+ return triggerEl.focus();
84
+ }
85
+ /** Blurs the trigger element. */
86
+ async blur() {
87
+ const triggerEl = await this.trigger();
88
+ return triggerEl.blur();
89
+ }
90
+ /** Whether the trigger element is focused. */
91
+ async isFocused() {
92
+ const triggerEl = await this.trigger();
93
+ return triggerEl.isFocused();
94
+ }
95
+ }
96
+
97
+ // Testing utilities for the collapsible component
98
+
99
+ /**
100
+ * Generated bundle index. Do not edit.
101
+ */
102
+
103
+ export { ComCollapsibleHarness };
104
+ //# sourceMappingURL=ngx-com-components-collapsible-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-collapsible-testing.mjs","sources":["../../../projects/com/components/collapsible/testing/collapsible.harness.ts","../../../projects/com/components/collapsible/testing/index.ts","../../../projects/com/components/collapsible/testing/ngx-com-components-collapsible-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 ComCollapsibleHarness. */\nexport interface ComCollapsibleHarnessFilters extends BaseHarnessFilters {\n /** Filter by whether the collapsible is expanded. */\n expanded?: boolean;\n /** Filter by whether the collapsible is disabled. */\n disabled?: boolean;\n}\n\n/**\n * Harness for interacting with a ComCollapsible in tests.\n */\nexport class ComCollapsibleHarness extends ComponentHarness {\n static hostSelector = '[comCollapsible]';\n\n private readonly trigger = this.locatorFor('[comCollapsibleTrigger]');\n private readonly content = this.locatorFor('com-collapsible-content');\n\n /**\n * Gets a HarnessPredicate for matching collapsibles.\n * @param options Filter options.\n */\n static with(options: ComCollapsibleHarnessFilters = {}): HarnessPredicate<ComCollapsibleHarness> {\n return new HarnessPredicate(ComCollapsibleHarness, options)\n .addOption('expanded', options.expanded, async (harness, expanded) => {\n return (await harness.isExpanded()) === expanded;\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\n }\n\n /** Whether the collapsible is currently expanded. */\n async isExpanded(): Promise<boolean> {\n const triggerEl = await this.trigger();\n return (await triggerEl.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the collapsible is disabled. */\n async isDisabled(): Promise<boolean> {\n const triggerEl = await this.trigger();\n return (await triggerEl.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Toggles the collapsible by clicking the trigger. */\n async toggle(): Promise<void> {\n const triggerEl = await this.trigger();\n return triggerEl.click();\n }\n\n /** Expands the collapsible if it is currently collapsed. */\n async expand(): Promise<void> {\n if (!(await this.isExpanded())) {\n await this.toggle();\n }\n }\n\n /** Collapses the collapsible if it is currently expanded. */\n async collapse(): Promise<void> {\n if (await this.isExpanded()) {\n await this.toggle();\n }\n }\n\n /** Gets the text content of the trigger element. */\n async getTriggerText(): Promise<string> {\n const triggerEl = await this.trigger();\n return triggerEl.text();\n }\n\n /** Gets the text content of the content element. */\n async getContentText(): Promise<string> {\n const contentEl = await this.content();\n return contentEl.text();\n }\n\n /** Gets the role attribute of the content element. */\n async getContentRole(): Promise<string | null> {\n const contentEl = await this.content();\n return contentEl.getAttribute('role');\n }\n\n /** Gets the aria-controls attribute from the trigger. */\n async getAriaControls(): Promise<string | null> {\n const triggerEl = await this.trigger();\n return triggerEl.getAttribute('aria-controls');\n }\n\n /** Gets the aria-labelledby attribute from the content. */\n async getAriaLabelledby(): Promise<string | null> {\n const contentEl = await this.content();\n return contentEl.getAttribute('aria-labelledby');\n }\n\n /** Whether the content element has the inert attribute. */\n async isContentInert(): Promise<boolean> {\n const contentEl = await this.content();\n return (await contentEl.getAttribute('inert')) !== null;\n }\n\n /** Focuses the trigger element. */\n async focus(): Promise<void> {\n const triggerEl = await this.trigger();\n return triggerEl.focus();\n }\n\n /** Blurs the trigger element. */\n async blur(): Promise<void> {\n const triggerEl = await this.trigger();\n return triggerEl.blur();\n }\n\n /** Whether the trigger element is focused. */\n async isFocused(): Promise<boolean> {\n const triggerEl = await this.trigger();\n return triggerEl.isFocused();\n }\n}\n","// Testing utilities for the collapsible component\n\nexport { ComCollapsibleHarness } from './collapsible.harness';\n\nexport type { ComCollapsibleHarnessFilters } from './collapsible.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAcA;;AAEG;AACG,MAAO,qBAAsB,SAAQ,gBAAgB,CAAA;AACzD,IAAA,OAAO,YAAY,GAAG,kBAAkB;AAEvB,IAAA,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;AACpD,IAAA,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;AAErE;;;AAGG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAwC,EAAE,EAAA;AACpD,QAAA,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO;AACvD,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,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAI;YACnE,OAAO,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ;AAClD,QAAA,CAAC,CAAC;IACN;;AAGA,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;QACtC,OAAO,CAAC,MAAM,SAAS,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM;IACnE;;AAGA,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;QACtC,OAAO,CAAC,MAAM,SAAS,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM;IACnE;;AAGA,IAAA,MAAM,MAAM,GAAA;AACV,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;AACtC,QAA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;;AAGA,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;AACtC,QAAA,OAAO,SAAS,CAAC,KAAK,EAAE;IAC1B;;AAGA,IAAA,MAAM,IAAI,GAAA;AACR,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;AACtC,QAAA,OAAO,SAAS,CAAC,IAAI,EAAE;IACzB;;AAGA,IAAA,MAAM,SAAS,GAAA;AACb,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;AACtC,QAAA,OAAO,SAAS,CAAC,SAAS,EAAE;IAC9B;;;ACzHF;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,150 @@
1
+ import { ComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with a confirm panel in tests.
5
+ *
6
+ * The panel renders inside a CDK overlay with `role="alertdialog"`.
7
+ * Obtain via `TestbedHarnessEnvironment.documentRootLoader(fixture)` or
8
+ * through `ComConfirmTriggerHarness.getPanel()`.
9
+ */
10
+ class ComConfirmPanelHarness extends ComponentHarness {
11
+ static hostSelector = 'com-confirm-panel';
12
+ alertdialog = this.locatorFor('[role="alertdialog"]');
13
+ title = this.locatorForOptional('[role="alertdialog"] h2');
14
+ message = this.locatorFor('[role="alertdialog"] p');
15
+ cancelButton = this.locatorFor('[role="alertdialog"] button:first-of-type');
16
+ confirmButton = this.locatorFor('[role="alertdialog"] button:last-of-type');
17
+ /**
18
+ * Gets a HarnessPredicate for matching confirm panels.
19
+ * @param options Filter options.
20
+ */
21
+ static with(options = {}) {
22
+ return new HarnessPredicate(ComConfirmPanelHarness, options);
23
+ }
24
+ /** Gets the title text, or null if no title is present. */
25
+ async getTitleText() {
26
+ const el = await this.title();
27
+ return el ? el.text() : null;
28
+ }
29
+ /** Gets the message text. */
30
+ async getMessageText() {
31
+ const el = await this.message();
32
+ return el.text();
33
+ }
34
+ /** Gets the confirm button text. */
35
+ async getConfirmButtonText() {
36
+ const el = await this.confirmButton();
37
+ return el.text();
38
+ }
39
+ /** Gets the cancel button text. */
40
+ async getCancelButtonText() {
41
+ const el = await this.cancelButton();
42
+ return el.text();
43
+ }
44
+ /** Clicks the confirm button. */
45
+ async confirm() {
46
+ const el = await this.confirmButton();
47
+ return el.click();
48
+ }
49
+ /** Clicks the cancel button. */
50
+ async cancel() {
51
+ const el = await this.cancelButton();
52
+ return el.click();
53
+ }
54
+ /** Gets the `data-state` attribute on the alertdialog element. */
55
+ async getState() {
56
+ const el = await this.alertdialog();
57
+ return el.getAttribute('data-state');
58
+ }
59
+ }
60
+ /**
61
+ * Harness for interacting with a confirm trigger in tests.
62
+ */
63
+ class ComConfirmTriggerHarness extends ComponentHarness {
64
+ static hostSelector = '[comConfirm]';
65
+ documentRootLocator = this.documentRootLocatorFactory();
66
+ /**
67
+ * Gets a HarnessPredicate for matching confirm triggers.
68
+ * @param options Filter options.
69
+ */
70
+ static with(options = {}) {
71
+ return new HarnessPredicate(ComConfirmTriggerHarness, options)
72
+ .addOption('text', options.text, async (harness, text) => {
73
+ const triggerText = await harness.getText();
74
+ return HarnessPredicate.stringMatches(triggerText, text);
75
+ });
76
+ }
77
+ /** Gets the trigger element's text. */
78
+ async getText() {
79
+ const host = await this.host();
80
+ return host.text();
81
+ }
82
+ /** Whether the confirm panel is currently open. */
83
+ async isOpen() {
84
+ const host = await this.host();
85
+ return (await host.getAttribute('aria-expanded')) === 'true';
86
+ }
87
+ /** Opens the confirm panel if it's closed. */
88
+ async open() {
89
+ if (!(await this.isOpen())) {
90
+ const host = await this.host();
91
+ await host.click();
92
+ }
93
+ }
94
+ /** Closes the confirm panel if it's open. */
95
+ async close() {
96
+ if (await this.isOpen()) {
97
+ const host = await this.host();
98
+ await host.sendKeys(TestKey.ESCAPE);
99
+ }
100
+ }
101
+ /** Gets the confirm panel harness, or null if the panel is closed. */
102
+ async getPanel() {
103
+ if (!(await this.isOpen())) {
104
+ return null;
105
+ }
106
+ return this.documentRootLocator.locatorForOptional(ComConfirmPanelHarness.with({}))();
107
+ }
108
+ /** Opens the panel and clicks the confirm button. */
109
+ async confirm() {
110
+ await this.open();
111
+ const panel = await this.getPanel();
112
+ if (!panel) {
113
+ throw new Error('Could not find confirm panel. Is the confirm directive correctly configured?');
114
+ }
115
+ return panel.confirm();
116
+ }
117
+ /** Opens the panel and clicks the cancel button. */
118
+ async cancel() {
119
+ await this.open();
120
+ const panel = await this.getPanel();
121
+ if (!panel) {
122
+ throw new Error('Could not find confirm panel. Is the confirm directive correctly configured?');
123
+ }
124
+ return panel.cancel();
125
+ }
126
+ /** Focuses the trigger element. */
127
+ async focus() {
128
+ const host = await this.host();
129
+ return host.focus();
130
+ }
131
+ /** Blurs the trigger element. */
132
+ async blur() {
133
+ const host = await this.host();
134
+ return host.blur();
135
+ }
136
+ /** Whether the trigger element is focused. */
137
+ async isFocused() {
138
+ const host = await this.host();
139
+ return host.isFocused();
140
+ }
141
+ }
142
+
143
+ // Testing utilities for the confirm component
144
+
145
+ /**
146
+ * Generated bundle index. Do not edit.
147
+ */
148
+
149
+ export { ComConfirmPanelHarness, ComConfirmTriggerHarness };
150
+ //# sourceMappingURL=ngx-com-components-confirm-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-confirm-testing.mjs","sources":["../../../projects/com/components/confirm/testing/confirm.harness.ts","../../../projects/com/components/confirm/testing/index.ts","../../../projects/com/components/confirm/testing/ngx-com-components-confirm-testing.ts"],"sourcesContent":["import {\n ComponentHarness,\n HarnessPredicate,\n TestKey,\n} from '@angular/cdk/testing';\nimport type { BaseHarnessFilters } from '@angular/cdk/testing';\n\n/** Harness filters for ComConfirmPanelHarness. */\nexport type ComConfirmPanelHarnessFilters = BaseHarnessFilters;\n\n/** Harness filters for ComConfirmTriggerHarness. */\nexport interface ComConfirmTriggerHarnessFilters extends BaseHarnessFilters {\n /** Filter by the trigger element's text. */\n text?: string | RegExp;\n}\n\n/**\n * Harness for interacting with a confirm panel in tests.\n *\n * The panel renders inside a CDK overlay with `role=\"alertdialog\"`.\n * Obtain via `TestbedHarnessEnvironment.documentRootLoader(fixture)` or\n * through `ComConfirmTriggerHarness.getPanel()`.\n */\nexport class ComConfirmPanelHarness extends ComponentHarness {\n static hostSelector = 'com-confirm-panel';\n\n private readonly alertdialog = this.locatorFor('[role=\"alertdialog\"]');\n private readonly title = this.locatorForOptional('[role=\"alertdialog\"] h2');\n private readonly message = this.locatorFor('[role=\"alertdialog\"] p');\n private readonly cancelButton = this.locatorFor('[role=\"alertdialog\"] button:first-of-type');\n private readonly confirmButton = this.locatorFor('[role=\"alertdialog\"] button:last-of-type');\n\n /**\n * Gets a HarnessPredicate for matching confirm panels.\n * @param options Filter options.\n */\n static with(\n options: ComConfirmPanelHarnessFilters = {},\n ): HarnessPredicate<ComConfirmPanelHarness> {\n return new HarnessPredicate(ComConfirmPanelHarness, options);\n }\n\n /** Gets the title text, or null if no title is present. */\n async getTitleText(): Promise<string | null> {\n const el = await this.title();\n return el ? el.text() : null;\n }\n\n /** Gets the message text. */\n async getMessageText(): Promise<string> {\n const el = await this.message();\n return el.text();\n }\n\n /** Gets the confirm button text. */\n async getConfirmButtonText(): Promise<string> {\n const el = await this.confirmButton();\n return el.text();\n }\n\n /** Gets the cancel button text. */\n async getCancelButtonText(): Promise<string> {\n const el = await this.cancelButton();\n return el.text();\n }\n\n /** Clicks the confirm button. */\n async confirm(): Promise<void> {\n const el = await this.confirmButton();\n return el.click();\n }\n\n /** Clicks the cancel button. */\n async cancel(): Promise<void> {\n const el = await this.cancelButton();\n return el.click();\n }\n\n /** Gets the `data-state` attribute on the alertdialog element. */\n async getState(): Promise<string | null> {\n const el = await this.alertdialog();\n return el.getAttribute('data-state');\n }\n}\n\n/**\n * Harness for interacting with a confirm trigger in tests.\n */\nexport class ComConfirmTriggerHarness extends ComponentHarness {\n static hostSelector = '[comConfirm]';\n\n private readonly documentRootLocator = this.documentRootLocatorFactory();\n\n /**\n * Gets a HarnessPredicate for matching confirm triggers.\n * @param options Filter options.\n */\n static with(\n options: ComConfirmTriggerHarnessFilters = {},\n ): HarnessPredicate<ComConfirmTriggerHarness> {\n return new HarnessPredicate(ComConfirmTriggerHarness, options)\n .addOption('text', options.text, async (harness, text) => {\n const triggerText = await harness.getText();\n return HarnessPredicate.stringMatches(triggerText, text);\n });\n }\n\n /** Gets the trigger element's text. */\n async getText(): Promise<string> {\n const host = await this.host();\n return host.text();\n }\n\n /** Whether the confirm panel is currently open. */\n async isOpen(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Opens the confirm panel if it's closed. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) {\n const host = await this.host();\n await host.click();\n }\n }\n\n /** Closes the confirm panel if it's open. */\n async close(): Promise<void> {\n if (await this.isOpen()) {\n const host = await this.host();\n await host.sendKeys(TestKey.ESCAPE);\n }\n }\n\n /** Gets the confirm panel harness, or null if the panel is closed. */\n async getPanel(): Promise<ComConfirmPanelHarness | null> {\n if (!(await this.isOpen())) {\n return null;\n }\n return this.documentRootLocator.locatorForOptional(ComConfirmPanelHarness.with({}))();\n }\n\n /** Opens the panel and clicks the confirm button. */\n async confirm(): Promise<void> {\n await this.open();\n const panel = await this.getPanel();\n if (!panel) {\n throw new Error(\n 'Could not find confirm panel. Is the confirm directive correctly configured?',\n );\n }\n return panel.confirm();\n }\n\n /** Opens the panel and clicks the cancel button. */\n async cancel(): Promise<void> {\n await this.open();\n const panel = await this.getPanel();\n if (!panel) {\n throw new Error(\n 'Could not find confirm panel. Is the confirm directive correctly configured?',\n );\n }\n return panel.cancel();\n }\n\n /** Focuses the trigger element. */\n async focus(): Promise<void> {\n const host = await this.host();\n return host.focus();\n }\n\n /** Blurs the trigger element. */\n async blur(): Promise<void> {\n const host = await this.host();\n return host.blur();\n }\n\n /** Whether the trigger element is focused. */\n async isFocused(): Promise<boolean> {\n const host = await this.host();\n return host.isFocused();\n }\n}\n","// Testing utilities for the confirm component\n\nexport {\n ComConfirmPanelHarness,\n ComConfirmTriggerHarness,\n} from './confirm.harness';\n\nexport type {\n ComConfirmPanelHarnessFilters,\n ComConfirmTriggerHarnessFilters,\n} from './confirm.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAgBA;;;;;;AAMG;AACG,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAC1D,IAAA,OAAO,YAAY,GAAG,mBAAmB;AAExB,IAAA,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;AACrD,IAAA,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,yBAAyB,CAAC;AAC1D,IAAA,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;AACnD,IAAA,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,2CAA2C,CAAC;AAC3E,IAAA,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,0CAA0C,CAAC;AAE5F;;;AAGG;AACH,IAAA,OAAO,IAAI,CACT,OAAA,GAAyC,EAAE,EAAA;AAE3C,QAAA,OAAO,IAAI,gBAAgB,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAC9D;;AAGA,IAAA,MAAM,YAAY,GAAA;AAChB,QAAA,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;AAC7B,QAAA,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,IAAI;IAC9B;;AAGA,IAAA,MAAM,cAAc,GAAA;AAClB,QAAA,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;AAC/B,QAAA,OAAO,EAAE,CAAC,IAAI,EAAE;IAClB;;AAGA,IAAA,MAAM,oBAAoB,GAAA;AACxB,QAAA,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE;AACrC,QAAA,OAAO,EAAE,CAAC,IAAI,EA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EAAE;QACnC,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E;QACH;AACA,QAAA,OAAO,KAAK,CAAC,MAAM,EAAE;IACvB;;AAGA,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE;AAC9B,QAAA,OAAO,IAAI,CAAC,KAAK,EAAE;IACrB;;AAGA,IAAA,MAAM,IAAI,GAAA;AACR,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE;AAC9B,QAAA,OAAO,IAAI,CAAC,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;;;ACvLF;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,137 @@
1
+ import { ComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with a ComDatepicker in tests.
5
+ */
6
+ class ComDatepickerHarness extends ComponentHarness {
7
+ static hostSelector = 'com-datepicker';
8
+ triggerGroup = this.locatorFor('div[role="group"]');
9
+ input = this.locatorFor('input[type="text"]');
10
+ clearButton = this.locatorForOptional('button[aria-label="Clear date"]');
11
+ calendarButton = this.locatorFor('button[aria-label$="calendar"]');
12
+ /**
13
+ * Gets a HarnessPredicate for matching datepickers.
14
+ * @param options Filter options.
15
+ */
16
+ static with(options = {}) {
17
+ return new HarnessPredicate(ComDatepickerHarness, options)
18
+ .addOption('placeholder', options.placeholder, async (harness, placeholder) => {
19
+ const text = await harness.getPlaceholder();
20
+ return HarnessPredicate.stringMatches(text, placeholder);
21
+ })
22
+ .addOption('disabled', options.disabled, async (harness, disabled) => {
23
+ return (await harness.isDisabled()) === disabled;
24
+ })
25
+ .addOption('open', options.open, async (harness, open) => {
26
+ return (await harness.isOpen()) === open;
27
+ });
28
+ }
29
+ /** Whether the datepicker panel is currently open. */
30
+ async isOpen() {
31
+ const trigger = await this.triggerGroup();
32
+ return (await trigger.getAttribute('aria-expanded')) === 'true';
33
+ }
34
+ /** Opens the datepicker panel if it is closed. */
35
+ async open() {
36
+ if (!(await this.isOpen())) {
37
+ const btn = await this.calendarButton();
38
+ await btn.click();
39
+ }
40
+ }
41
+ /** Closes the datepicker panel if it is open. */
42
+ async close() {
43
+ if (await this.isOpen()) {
44
+ const host = await this.host();
45
+ await host.sendKeys(TestKey.ESCAPE);
46
+ }
47
+ }
48
+ /** Whether the datepicker is disabled. */
49
+ async isDisabled() {
50
+ const trigger = await this.triggerGroup();
51
+ return (await trigger.getAttribute('aria-disabled')) === 'true';
52
+ }
53
+ /** Whether the datepicker input has the required attribute. */
54
+ async isRequired() {
55
+ const inputEl = await this.input();
56
+ return (await inputEl.getAttribute('aria-required')) === 'true';
57
+ }
58
+ /** Whether the datepicker input is in an invalid state. */
59
+ async isInvalid() {
60
+ const inputEl = await this.input();
61
+ return (await inputEl.getAttribute('aria-invalid')) === 'true';
62
+ }
63
+ /** Gets the current value displayed in the input. */
64
+ async getInputValue() {
65
+ const inputEl = await this.input();
66
+ return inputEl.getProperty('value');
67
+ }
68
+ /** Sets the input value by clearing and typing the given text. */
69
+ async setInputValue(text) {
70
+ const inputEl = await this.input();
71
+ await inputEl.clear();
72
+ await inputEl.sendKeys(text);
73
+ }
74
+ /** Gets the placeholder text of the input. */
75
+ async getPlaceholder() {
76
+ const inputEl = await this.input();
77
+ return (await inputEl.getAttribute('placeholder')) ?? '';
78
+ }
79
+ /** Whether the datepicker currently has a value (clear button is visible). */
80
+ async hasValue() {
81
+ const clearBtn = await this.clearButton();
82
+ return clearBtn !== null;
83
+ }
84
+ /** Clears the current value by clicking the clear button. Throws if no value is set. */
85
+ async clear() {
86
+ const clearBtn = await this.clearButton();
87
+ if (!clearBtn) {
88
+ throw new Error('Datepicker does not have a clearable value');
89
+ }
90
+ return clearBtn.click();
91
+ }
92
+ /** Gets the calendar panel element from the overlay. The datepicker must be open. */
93
+ async getCalendarPanel() {
94
+ if (!(await this.isOpen())) {
95
+ throw new Error('Datepicker panel is not open');
96
+ }
97
+ return this.documentRootLocatorFactory().locatorFor('com-calendar')();
98
+ }
99
+ /** Selects a day by its visible number. Opens the panel if closed. */
100
+ async selectDate(day) {
101
+ await this.open();
102
+ const rootLocator = this.documentRootLocatorFactory();
103
+ const dayButtons = await rootLocator.locatorForAll('div[role="dialog"] com-calendar-cell button')();
104
+ for (const btn of dayButtons) {
105
+ const text = (await btn.text()).trim();
106
+ if (text === String(day)) {
107
+ await btn.click();
108
+ return;
109
+ }
110
+ }
111
+ throw new Error(`Could not find day cell with number: ${day}`);
112
+ }
113
+ /** Focuses the datepicker input. */
114
+ async focus() {
115
+ const inputEl = await this.input();
116
+ return inputEl.focus();
117
+ }
118
+ /** Blurs the datepicker input. */
119
+ async blur() {
120
+ const inputEl = await this.input();
121
+ return inputEl.blur();
122
+ }
123
+ /** Whether the datepicker input is currently focused. */
124
+ async isFocused() {
125
+ const inputEl = await this.input();
126
+ return inputEl.isFocused();
127
+ }
128
+ }
129
+
130
+ // Testing utilities for the datepicker component
131
+
132
+ /**
133
+ * Generated bundle index. Do not edit.
134
+ */
135
+
136
+ export { ComDatepickerHarness };
137
+ //# sourceMappingURL=ngx-com-components-datepicker-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-datepicker-testing.mjs","sources":["../../../projects/com/components/datepicker/testing/datepicker.harness.ts","../../../projects/com/components/datepicker/testing/index.ts","../../../projects/com/components/datepicker/testing/ngx-com-components-datepicker-testing.ts"],"sourcesContent":["import {\n ComponentHarness,\n HarnessPredicate,\n TestKey,\n} from '@angular/cdk/testing';\nimport type { BaseHarnessFilters, TestElement } from '@angular/cdk/testing';\n\n/** Harness filters for ComDatepickerHarness. */\nexport interface ComDatepickerHarnessFilters extends BaseHarnessFilters {\n /** Filter by the datepicker's placeholder text. */\n placeholder?: string | RegExp;\n /** Filter by whether the datepicker is disabled. */\n disabled?: boolean;\n /** Filter by whether the datepicker panel is open. */\n open?: boolean;\n}\n\n/**\n * Harness for interacting with a ComDatepicker in tests.\n */\nexport class ComDatepickerHarness extends ComponentHarness {\n static hostSelector = 'com-datepicker';\n\n private readonly triggerGroup = this.locatorFor('div[role=\"group\"]');\n private readonly input = this.locatorFor('input[type=\"text\"]');\n private readonly clearButton = this.locatorForOptional('button[aria-label=\"Clear date\"]');\n private readonly calendarButton = this.locatorFor('button[aria-label$=\"calendar\"]');\n\n /**\n * Gets a HarnessPredicate for matching datepickers.\n * @param options Filter options.\n */\n static with(options: ComDatepickerHarnessFilters = {}): HarnessPredicate<ComDatepickerHarness> {\n return new HarnessPredicate(ComDatepickerHarness, options)\n .addOption('placeholder', options.placeholder, async (harness, placeholder) => {\n const text = await harness.getPlaceholder();\n return HarnessPredicate.stringMatches(text, placeholder);\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n })\n .addOption('open', options.open, async (harness, open) => {\n return (await harness.isOpen()) === open;\n });\n }\n\n /** Whether the datepicker panel is currently open. */\n async isOpen(): Promise<boolean> {\n const trigger = await this.triggerGroup();\n return (await trigger.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Opens the datepicker panel if it is closed. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) {\n const btn = await this.calendarButton();\n await btn.click();\n }\n }\n\n /** Closes the datepicker panel if it is open. */\n async close(): Promise<void> {\n if (await this.isOpen()) {\n const host = await this.host();\n await host.sendKeys(TestKey.ESCAPE);\n }\n }\n\n /** Whether the datepicker is disabled. */\n async isDisabled(): Promise<boolean> {\n const trigger = await this.triggerGroup();\n return (await trigger.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the datepicker input has the required attribute. */\n async isRequired(): Promise<boolean> {\n const inputEl = await this.input();\n return (await inputEl.getAttribute('aria-required')) === 'true';\n }\n\n /** Whether the datepicker input is in an invalid state. */\n async isInvalid(): Promise<boolean> {\n const inputEl = await this.input();\n return (await inputEl.getAttribute('aria-invalid')) === 'true';\n }\n\n /** Gets the current value displayed in the input. */\n async getInputValue(): Promise<string> {\n const inputEl = await this.input();\n return inputEl.getProperty<string>('value');\n }\n\n /** Sets the input value by clearing and typing the given text. */\n async setInputValue(text: string): Promise<void> {\n const inputEl = await this.input();\n await inputEl.clear();\n await inputEl.sendKeys(text);\n }\n\n /** Gets the placeholder text of the input. */\n async getPlaceholder(): Promise<string> {\n const inputEl = await this.input();\n return (await inputEl.getAttribute('placeholder')) ?? '';\n }\n\n /** Whether the datepicker currently has a value (clear button is visible). */\n async hasValue(): Promise<boolean> {\n const clearBtn = await this.clearButton();\n return clearBtn !== null;\n }\n\n /** Clears the current value by clicking the clear button. Throws if no value is set. */\n async clear(): Promise<void> {\n const clearBtn = await this.clearButton();\n if (!clearBtn) {\n throw new Error('Datepicker does not have a clearable value');\n }\n return clearBtn.click();\n }\n\n /** Gets the calendar panel element from the overlay. The datepicker must be open. */\n async getCalendarPanel(): Promise<TestElement> {\n if (!(await this.isOpen())) {\n throw new Error('Datepicker panel is not open');\n }\n return this.documentRootLocatorFactory().locatorFor('com-calendar')();\n }\n\n /** Selects a day by its visible number. Opens the panel if closed. */\n async selectDate(day: number): Promise<void> {\n await this.open();\n const rootLocator = this.documentRootLocatorFactory();\n const dayButtons = await rootLocator.locatorForAll('div[role=\"dialog\"] com-calendar-cell button')();\n for (const btn of dayButtons) {\n const text = (await btn.text()).trim();\n if (text === String(day)) {\n await btn.click();\n return;\n }\n }\n throw new Error(`Could not find day cell with number: ${day}`);\n }\n\n /** Focuses the datepicker input. */\n async focus(): Promise<void> {\n const inputEl = await this.input();\n return inputEl.focus();\n }\n\n /** Blurs the datepicker input. */\n async blur(): Promise<void> {\n const inputEl = await this.input();\n return inputEl.blur();\n }\n\n /** Whether the datepicker input is currently focused. */\n async isFocused(): Promise<boolean> {\n const inputEl = await this.input();\n return inputEl.isFocused();\n }\n}\n","// Testing utilities for the datepicker component\n\nexport { ComDatepickerHarness } from './datepicker.harness';\n\nexport type { ComDatepickerHarnessFilters } from './datepicker.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAiBA;;AAEG;AACG,MAAO,oBAAqB,SAAQ,gBAAgB,CAAA;AACxD,IAAA,OAAO,YAAY,GAAG,gBAAgB;AAErB,IAAA,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;AACnD,IAAA,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;AAC7C,IAAA,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,iCAAiC,CAAC;AACxE,IAAA,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,gCAAgC,CAAC;AAEnF;;;AAGG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAuC,EAAE,EAAA;AACnD,QAAA,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO;AACtD,aAAA,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,WAAW,EAAE,OAAO,OAAO,EAAE,WAAW,KAAI;AAC5E,YAAA,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE;YAC3C,OAAO,gBAAgB,CAAC,aAAa,CAAC,IAAI,EAAE,WAAW,CAAC;AAC1D,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,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,OAAO,EAAE,IAAI,KAAI;YACvD,OAAO,CAAC,MAAM,OAAO,CAAC,MAAM,EAAE,MAAM,IAAI;AAC1C,QAAA,C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,GAAG,IAAI,UAAU,EAAE;AAC5B,YAAA,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;AACtC,YAAA,IAAI,IAAI,KAAK,MAAM,CAAC,GAAG,CAAC,EAAE;AACxB,gBAAA,MAAM,GAAG,CAAC,KAAK,EAAE;gBACjB;YACF;QACF;AACA,QAAA,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,CAAA,CAAE,CAAC;IAChE;;AAGA,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;AAClC,QAAA,OAAO,OAAO,CAAC,KAAK,EAAE;IACxB;;AAGA,IAAA,MAAM,IAAI,GAAA;AACR,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;AAClC,QAAA,OAAO,OAAO,CAAC,IAAI,EAAE;IACvB;;AAGA,IAAA,MAAM,SAAS,GAAA;AACb,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;AAClC,QAAA,OAAO,OAAO,CAAC,SAAS,EAAE;IAC5B;;;AC/JF;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,109 @@
1
+ import { ComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * Harness for interacting with a dialog container in tests.
5
+ *
6
+ * Because dialogs render inside a CDK overlay (outside the component tree),
7
+ * obtain this harness via `TestbedHarnessEnvironment.documentRootLoader(fixture)`.
8
+ */
9
+ class ComDialogContainerHarness extends ComponentHarness {
10
+ static hostSelector = 'com-dialog-container';
11
+ panel = this.locatorFor('[role="dialog"], [role="alertdialog"]');
12
+ titleEl = this.locatorForOptional('[comDialogTitle]');
13
+ contentEl = this.locatorForOptional('[comDialogContent]');
14
+ actionsEl = this.locatorForOptional('[comDialogActions]');
15
+ closeButton = this.locatorForOptional('[comDialogClose]');
16
+ /**
17
+ * Gets a HarnessPredicate for matching dialog containers.
18
+ * @param options Filter options.
19
+ */
20
+ static with(options = {}) {
21
+ return new HarnessPredicate(ComDialogContainerHarness, options);
22
+ }
23
+ /** Gets the dialog panel's `aria-label` attribute. */
24
+ async getAriaLabel() {
25
+ const el = await this.panel();
26
+ return el.getAttribute('aria-label');
27
+ }
28
+ /** Gets the dialog panel's `aria-labelledby` attribute. */
29
+ async getAriaLabelledby() {
30
+ const el = await this.panel();
31
+ return el.getAttribute('aria-labelledby');
32
+ }
33
+ /** Gets the dialog panel's `aria-describedby` attribute. */
34
+ async getAriaDescribedby() {
35
+ const el = await this.panel();
36
+ return el.getAttribute('aria-describedby');
37
+ }
38
+ /** Gets the role attribute on the dialog panel. */
39
+ async getRole() {
40
+ const el = await this.panel();
41
+ return el.getAttribute('role');
42
+ }
43
+ /** Gets the text content of the `[comDialogTitle]` element, or null if none exists. */
44
+ async getTitleText() {
45
+ const el = await this.titleEl();
46
+ return el ? el.text() : null;
47
+ }
48
+ /** Gets the text content of the `[comDialogContent]` element, or null if none exists. */
49
+ async getContentText() {
50
+ const el = await this.contentEl();
51
+ return el ? el.text() : null;
52
+ }
53
+ /** Gets the text content of the `[comDialogActions]` element, or null if none exists. */
54
+ async getActionsText() {
55
+ const el = await this.actionsEl();
56
+ return el ? el.text() : null;
57
+ }
58
+ /** Gets the `data-state` attribute on the dialog panel. */
59
+ async getState() {
60
+ const el = await this.panel();
61
+ return el.getAttribute('data-state');
62
+ }
63
+ /**
64
+ * Closes the dialog by clicking the `[comDialogClose]` button.
65
+ * Throws if no close button is found.
66
+ */
67
+ async close() {
68
+ const btn = await this.closeButton();
69
+ if (!btn) {
70
+ throw new Error('Could not find a [comDialogClose] element. ' +
71
+ 'Make sure the dialog template includes a button with the comDialogClose directive.');
72
+ }
73
+ await btn.click();
74
+ }
75
+ /** Sends an Escape key press to the dialog panel to close it. */
76
+ async sendEscapeKey() {
77
+ const el = await this.panel();
78
+ await el.sendKeys(TestKey.ESCAPE);
79
+ }
80
+ /** Whether the dialog container is disabled. */
81
+ async isDisabled() {
82
+ const host = await this.host();
83
+ return (await host.getAttribute('aria-disabled')) === 'true';
84
+ }
85
+ /** Whether the dialog panel is focused. */
86
+ async isFocused() {
87
+ const el = await this.panel();
88
+ return el.isFocused();
89
+ }
90
+ /** Focuses the dialog panel. */
91
+ async focus() {
92
+ const el = await this.panel();
93
+ return el.focus();
94
+ }
95
+ /** Blurs the dialog panel. */
96
+ async blur() {
97
+ const el = await this.panel();
98
+ return el.blur();
99
+ }
100
+ }
101
+
102
+ // Testing utilities for the dialog component
103
+
104
+ /**
105
+ * Generated bundle index. Do not edit.
106
+ */
107
+
108
+ export { ComDialogContainerHarness };
109
+ //# sourceMappingURL=ngx-com-components-dialog-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-com-components-dialog-testing.mjs","sources":["../../../projects/com/components/dialog/testing/dialog.harness.ts","../../../projects/com/components/dialog/testing/index.ts","../../../projects/com/components/dialog/testing/ngx-com-components-dialog-testing.ts"],"sourcesContent":["import {\n ComponentHarness,\n HarnessPredicate,\n TestKey,\n} from '@angular/cdk/testing';\nimport type { BaseHarnessFilters } from '@angular/cdk/testing';\n\n/** Harness filters for ComDialogContainerHarness. */\nexport type ComDialogContainerHarnessFilters = BaseHarnessFilters;\n\n/**\n * Harness for interacting with a dialog container in tests.\n *\n * Because dialogs render inside a CDK overlay (outside the component tree),\n * obtain this harness via `TestbedHarnessEnvironment.documentRootLoader(fixture)`.\n */\nexport class ComDialogContainerHarness extends ComponentHarness {\n static hostSelector = 'com-dialog-container';\n\n private readonly panel = this.locatorFor('[role=\"dialog\"], [role=\"alertdialog\"]');\n private readonly titleEl = this.locatorForOptional('[comDialogTitle]');\n private readonly contentEl = this.locatorForOptional('[comDialogContent]');\n private readonly actionsEl = this.locatorForOptional('[comDialogActions]');\n private readonly closeButton = this.locatorForOptional('[comDialogClose]');\n\n /**\n * Gets a HarnessPredicate for matching dialog containers.\n * @param options Filter options.\n */\n static with(\n options: ComDialogContainerHarnessFilters = {},\n ): HarnessPredicate<ComDialogContainerHarness> {\n return new HarnessPredicate(ComDialogContainerHarness, options);\n }\n\n /** Gets the dialog panel's `aria-label` attribute. */\n async getAriaLabel(): Promise<string | null> {\n const el = await this.panel();\n return el.getAttribute('aria-label');\n }\n\n /** Gets the dialog panel's `aria-labelledby` attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n const el = await this.panel();\n return el.getAttribute('aria-labelledby');\n }\n\n /** Gets the dialog panel's `aria-describedby` attribute. */\n async getAriaDescribedby(): Promise<string | null> {\n const el = await this.panel();\n return el.getAttribute('aria-describedby');\n }\n\n /** Gets the role attribute on the dialog panel. */\n async getRole(): Promise<string | null> {\n const el = await this.panel();\n return el.getAttribute('role');\n }\n\n /** Gets the text content of the `[comDialogTitle]` element, or null if none exists. */\n async getTitleText(): Promise<string | null> {\n const el = await this.titleEl();\n return el ? el.text() : null;\n }\n\n /** Gets the text content of the `[comDialogContent]` element, or null if none exists. */\n async getContentText(): Promise<string | null> {\n const el = await this.contentEl();\n return el ? el.text() : null;\n }\n\n /** Gets the text content of the `[comDialogActions]` element, or null if none exists. */\n async getActionsText(): Promise<string | null> {\n const el = await this.actionsEl();\n return el ? el.text() : null;\n }\n\n /** Gets the `data-state` attribute on the dialog panel. */\n async getState(): Promise<string | null> {\n const el = await this.panel();\n return el.getAttribute('data-state');\n }\n\n /**\n * Closes the dialog by clicking the `[comDialogClose]` button.\n * Throws if no close button is found.\n */\n async close(): Promise<void> {\n const btn = await this.closeButton();\n if (!btn) {\n throw new Error(\n 'Could not find a [comDialogClose] element. ' +\n 'Make sure the dialog template includes a button with the comDialogClose directive.',\n );\n }\n await btn.click();\n }\n\n /** Sends an Escape key press to the dialog panel to close it. */\n async sendEscapeKey(): Promise<void> {\n const el = await this.panel();\n await el.sendKeys(TestKey.ESCAPE);\n }\n\n /** Whether the dialog container is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the dialog panel is focused. */\n async isFocused(): Promise<boolean> {\n const el = await this.panel();\n return el.isFocused();\n }\n\n /** Focuses the dialog panel. */\n async focus(): Promise<void> {\n const el = await this.panel();\n return el.focus();\n }\n\n /** Blurs the dialog panel. */\n async blur(): Promise<void> {\n const el = await this.panel();\n return el.blur();\n }\n}\n","// Testing utilities for the dialog component\n\nexport { ComDialogContainerHarness } from './dialog.harness';\n\nexport type { ComDialogContainerHarnessFilters } from './dialog.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAUA;;;;;AAKG;AACG,MAAO,yBAA0B,SAAQ,gBAAgB,CAAA;AAC7D,IAAA,OAAO,YAAY,GAAG,sBAAsB;AAE3B,IAAA,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,uCAAuC,CAAC;AAChE,IAAA,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC;AACrD,IAAA,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC;AACzD,IAAA,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC;AACzD,IAAA,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC;AAE1E;;;AAGG;AACH,IAAA,OAAO,IAAI,CACT,OAAA,GAA4C,EAAE,EAAA;AAE9C,QAAA,OAAO,IAAI,gBAAgB,CAAC,yBAAyB,EAAE,OAAO,CAAC;IACjE;;AAGA,IAAA,MAAM,YAAY,GAAA;AAChB,QAAA,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;AAC7B,QAAA,OAAO,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC;IACtC;;AAGA,IAAA,MAAM,iBAAiB,GAAA;AACrB,QAAA,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;AAC7B,QAAA,OAAO,EAAE,CAAC,YAAY,CAAC,iBA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