@angular/material 11.1.0 → 11.1.1

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 (83) hide show
  1. package/autocomplete/index.metadata.json +1 -1
  2. package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
  3. package/bundles/material-autocomplete-testing.umd.js +45 -35
  4. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  5. package/bundles/material-autocomplete-testing.umd.min.js +2 -2
  6. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  7. package/bundles/material-autocomplete.umd.js +1 -1
  8. package/bundles/material-autocomplete.umd.min.js +1 -1
  9. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  10. package/bundles/material-checkbox-testing.umd.js +64 -63
  11. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  12. package/bundles/material-checkbox-testing.umd.min.js +2 -2
  13. package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
  14. package/bundles/material-core.umd.js +2 -2
  15. package/bundles/material-core.umd.js.map +1 -1
  16. package/bundles/material-core.umd.min.js +2 -2
  17. package/bundles/material-core.umd.min.js.map +1 -1
  18. package/bundles/material-datepicker.umd.js +17 -4
  19. package/bundles/material-datepicker.umd.js.map +1 -1
  20. package/bundles/material-datepicker.umd.min.js +8 -8
  21. package/bundles/material-datepicker.umd.min.js.map +1 -1
  22. package/bundles/material-form-field.umd.js +1 -1
  23. package/bundles/material-form-field.umd.min.js +1 -1
  24. package/bundles/material-form-field.umd.min.js.map +1 -1
  25. package/bundles/material-menu-testing.umd.js +85 -66
  26. package/bundles/material-menu-testing.umd.js.map +1 -1
  27. package/bundles/material-menu-testing.umd.min.js +2 -2
  28. package/bundles/material-menu-testing.umd.min.js.map +1 -1
  29. package/bundles/material-paginator-testing.umd.js +41 -33
  30. package/bundles/material-paginator-testing.umd.js.map +1 -1
  31. package/bundles/material-paginator-testing.umd.min.js +2 -2
  32. package/bundles/material-paginator-testing.umd.min.js.map +1 -1
  33. package/bundles/material-radio-testing.umd.js +79 -62
  34. package/bundles/material-radio-testing.umd.js.map +1 -1
  35. package/bundles/material-radio-testing.umd.min.js +2 -2
  36. package/bundles/material-radio-testing.umd.min.js.map +1 -1
  37. package/bundles/material-select-testing.umd.js +62 -51
  38. package/bundles/material-select-testing.umd.js.map +1 -1
  39. package/bundles/material-select-testing.umd.min.js +2 -2
  40. package/bundles/material-select-testing.umd.min.js.map +1 -1
  41. package/checkbox/testing/checkbox-harness.d.ts +21 -16
  42. package/core/index.metadata.json +1 -1
  43. package/datepicker/date-range-input.d.ts +1 -0
  44. package/datepicker/datepicker-input.d.ts +4 -2
  45. package/datepicker/index.metadata.json +1 -1
  46. package/esm2015/autocomplete/autocomplete.js +1 -1
  47. package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
  48. package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
  49. package/esm2015/core/common-behaviors/common-module.js +1 -1
  50. package/esm2015/core/version.js +1 -1
  51. package/esm2015/datepicker/date-range-input.js +10 -2
  52. package/esm2015/datepicker/datepicker-input.js +8 -1
  53. package/esm2015/datepicker/datepicker-toggle.js +2 -5
  54. package/esm2015/form-field/form-field.js +1 -1
  55. package/esm2015/menu/testing/menu-harness.js +44 -32
  56. package/esm2015/paginator/testing/paginator-harness.js +27 -25
  57. package/esm2015/radio/testing/radio-harness.js +40 -29
  58. package/esm2015/select/testing/select-harness.js +35 -29
  59. package/fesm2015/autocomplete/testing.js +26 -18
  60. package/fesm2015/autocomplete/testing.js.map +1 -1
  61. package/fesm2015/autocomplete.js +1 -1
  62. package/fesm2015/checkbox/testing.js +30 -35
  63. package/fesm2015/checkbox/testing.js.map +1 -1
  64. package/fesm2015/core.js +2 -2
  65. package/fesm2015/core.js.map +1 -1
  66. package/fesm2015/datepicker.js +15 -4
  67. package/fesm2015/datepicker.js.map +1 -1
  68. package/fesm2015/form-field.js +1 -1
  69. package/fesm2015/menu/testing.js +45 -33
  70. package/fesm2015/menu/testing.js.map +1 -1
  71. package/fesm2015/paginator/testing.js +26 -24
  72. package/fesm2015/paginator/testing.js.map +1 -1
  73. package/fesm2015/radio/testing.js +39 -28
  74. package/fesm2015/radio/testing.js.map +1 -1
  75. package/fesm2015/select/testing.js +35 -29
  76. package/fesm2015/select/testing.js.map +1 -1
  77. package/form-field/index.metadata.json +1 -1
  78. package/menu/testing/menu-harness.d.ts +39 -26
  79. package/package.json +2 -2
  80. package/paginator/testing/paginator-harness.d.ts +32 -19
  81. package/radio/testing/radio-harness.d.ts +39 -24
  82. package/schematics/ng-add/index.js +1 -1
  83. package/select/testing/select-harness.d.ts +28 -16
@@ -677,7 +677,7 @@ MatFormField.decorators = [
677
677
  providers: [
678
678
  { provide: MAT_FORM_FIELD, useExisting: MatFormField },
679
679
  ],
680
- styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
680
+ styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
681
681
  },] }
682
682
  ];
683
683
  MatFormField.ctorParameters = () => [
@@ -1,5 +1,5 @@
1
1
  import { __awaiter } from 'tslib';
2
- import { ContentContainerComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
2
+ import { ContentContainerComponentHarness, TestKey, HarnessPredicate } from '@angular/cdk/testing';
3
3
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
4
4
 
5
5
  /**
@@ -9,23 +9,12 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
9
9
  * Use of this source code is governed by an MIT-style license that can be
10
10
  * found in the LICENSE file at https://angular.io/license
11
11
  */
12
- /** Harness for interacting with a standard mat-menu in tests. */
13
- class MatMenuHarness extends ContentContainerComponentHarness {
12
+ class _MatMenuHarnessBase extends ContentContainerComponentHarness {
14
13
  constructor() {
15
14
  super(...arguments);
16
15
  this._documentRootLocator = this.documentRootLocatorFactory();
17
16
  }
18
17
  // TODO: potentially extend MatButtonHarness
19
- /**
20
- * Gets a `HarnessPredicate` that can be used to search for a `MatMenuHarness` that meets certain
21
- * criteria.
22
- * @param options Options for filtering which menu instances are considered a match.
23
- * @return a `HarnessPredicate` configured with the given options.
24
- */
25
- static with(options = {}) {
26
- return new HarnessPredicate(MatMenuHarness, options)
27
- .addOption('triggerText', options.triggerText, (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text));
28
- }
29
18
  /** Whether the menu is disabled. */
30
19
  isDisabled() {
31
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -84,11 +73,11 @@ class MatMenuHarness extends ContentContainerComponentHarness {
84
73
  * Gets a list of `MatMenuItemHarness` representing the items in the menu.
85
74
  * @param filters Optionally filters which menu items are included.
86
75
  */
87
- getItems(filters = {}) {
76
+ getItems(filters) {
88
77
  return __awaiter(this, void 0, void 0, function* () {
89
78
  const panelId = yield this._getPanelId();
90
79
  if (panelId) {
91
- return this._documentRootLocator.locatorForAll(MatMenuItemHarness.with(Object.assign(Object.assign({}, filters), { ancestor: `#${panelId}` })))();
80
+ return this._documentRootLocator.locatorForAll(this._itemClass.with(Object.assign(Object.assign({}, (filters || {})), { ancestor: `#${panelId}` })))();
92
81
  }
93
82
  return [];
94
83
  });
@@ -139,21 +128,7 @@ class MatMenuHarness extends ContentContainerComponentHarness {
139
128
  });
140
129
  }
141
130
  }
142
- /** The selector for the host element of a `MatMenu` instance. */
143
- MatMenuHarness.hostSelector = '.mat-menu-trigger';
144
- /** Harness for interacting with a standard mat-menu-item in tests. */
145
- class MatMenuItemHarness extends ContentContainerComponentHarness {
146
- /**
147
- * Gets a `HarnessPredicate` that can be used to search for a `MatMenuItemHarness` that meets
148
- * certain criteria.
149
- * @param options Options for filtering which menu item instances are considered a match.
150
- * @return a `HarnessPredicate` configured with the given options.
151
- */
152
- static with(options = {}) {
153
- return new HarnessPredicate(MatMenuItemHarness, options)
154
- .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))
155
- .addOption('hasSubmenu', options.hasSubmenu, (harness, hasSubmenu) => __awaiter(this, void 0, void 0, function* () { return (yield harness.hasSubmenu()) === hasSubmenu; }));
156
- }
131
+ class _MatMenuItemHarnessBase extends ContentContainerComponentHarness {
157
132
  /** Whether the menu is disabled. */
158
133
  isDisabled() {
159
134
  return __awaiter(this, void 0, void 0, function* () {
@@ -194,19 +169,56 @@ class MatMenuItemHarness extends ContentContainerComponentHarness {
194
169
  /** Whether this item has a submenu. */
195
170
  hasSubmenu() {
196
171
  return __awaiter(this, void 0, void 0, function* () {
197
- return (yield this.host()).matchesSelector(MatMenuHarness.hostSelector);
172
+ return (yield this.host()).matchesSelector(this._menuClass.hostSelector);
198
173
  });
199
174
  }
200
175
  /** Gets the submenu associated with this menu item, or null if none. */
201
176
  getSubmenu() {
202
177
  return __awaiter(this, void 0, void 0, function* () {
203
178
  if (yield this.hasSubmenu()) {
204
- return new MatMenuHarness(this.locatorFactory);
179
+ return new this._menuClass(this.locatorFactory);
205
180
  }
206
181
  return null;
207
182
  });
208
183
  }
209
184
  }
185
+ /** Harness for interacting with a standard mat-menu in tests. */
186
+ class MatMenuHarness extends _MatMenuHarnessBase {
187
+ constructor() {
188
+ super(...arguments);
189
+ this._itemClass = MatMenuItemHarness;
190
+ }
191
+ /**
192
+ * Gets a `HarnessPredicate` that can be used to search for a `MatMenuHarness` that meets certain
193
+ * criteria.
194
+ * @param options Options for filtering which menu instances are considered a match.
195
+ * @return a `HarnessPredicate` configured with the given options.
196
+ */
197
+ static with(options = {}) {
198
+ return new HarnessPredicate(MatMenuHarness, options)
199
+ .addOption('triggerText', options.triggerText, (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text));
200
+ }
201
+ }
202
+ /** The selector for the host element of a `MatMenu` instance. */
203
+ MatMenuHarness.hostSelector = '.mat-menu-trigger';
204
+ /** Harness for interacting with a standard mat-menu-item in tests. */
205
+ class MatMenuItemHarness extends _MatMenuItemHarnessBase {
206
+ constructor() {
207
+ super(...arguments);
208
+ this._menuClass = MatMenuHarness;
209
+ }
210
+ /**
211
+ * Gets a `HarnessPredicate` that can be used to search for a `MatMenuItemHarness` that meets
212
+ * certain criteria.
213
+ * @param options Options for filtering which menu item instances are considered a match.
214
+ * @return a `HarnessPredicate` configured with the given options.
215
+ */
216
+ static with(options = {}) {
217
+ return new HarnessPredicate(MatMenuItemHarness, options)
218
+ .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))
219
+ .addOption('hasSubmenu', options.hasSubmenu, (harness, hasSubmenu) => __awaiter(this, void 0, void 0, function* () { return (yield harness.hasSubmenu()) === hasSubmenu; }));
220
+ }
221
+ }
210
222
  /** The selector for the host element of a `MatMenuItem` instance. */
211
223
  MatMenuItemHarness.hostSelector = '.mat-menu-item';
212
224
 
@@ -234,5 +246,5 @@ MatMenuItemHarness.hostSelector = '.mat-menu-item';
234
246
  * found in the LICENSE file at https://angular.io/license
235
247
  */
236
248
 
237
- export { MatMenuHarness, MatMenuItemHarness };
249
+ export { MatMenuHarness, MatMenuItemHarness, _MatMenuHarnessBase, _MatMenuItemHarnessBase };
238
250
  //# sourceMappingURL=testing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu__testing.js","sources":["../../../../../../src/material/menu/testing/menu-harness.ts","../../../../../../src/material/menu/testing/menu-harness-filters.ts","../../../../../../src/material/menu/testing/public-api.ts","../../../../../../src/material/menu/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n TestElement,\n TestKey,\n} from '@angular/cdk/testing';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MenuHarnessFilters, MenuItemHarnessFilters} from './menu-harness-filters';\n\n/** Harness for interacting with a standard mat-menu in tests. */\nexport class MatMenuHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatMenu` instance. */\n static hostSelector = '.mat-menu-trigger';\n\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n // TODO: potentially extend MatButtonHarness\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatMenuHarness` that meets certain\n * criteria.\n * @param options Options for filtering which menu instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: MenuHarnessFilters = {}): HarnessPredicate<MatMenuHarness> {\n return new HarnessPredicate(MatMenuHarness, options)\n .addOption('triggerText', options.triggerText,\n (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text));\n }\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the menu is open. */\n async isOpen(): Promise<boolean> {\n return !!(await this._getMenuPanel());\n }\n\n /** Gets the text of the menu's trigger element. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Opens the menu. */\n async open(): Promise<void> {\n if (!await this.isOpen()) {\n return (await this.host()).click();\n }\n }\n\n /** Closes the menu. */\n async close(): Promise<void> {\n const panel = await this._getMenuPanel();\n if (panel) {\n return panel.sendKeys(TestKey.ESCAPE);\n }\n }\n\n /**\n * Gets a list of `MatMenuItemHarness` representing the items in the menu.\n * @param filters Optionally filters which menu items are included.\n */\n async getItems(filters: Omit<MenuItemHarnessFilters, 'ancestor'> = {}):\n Promise<MatMenuItemHarness[]> {\n const panelId = await this._getPanelId();\n if (panelId) {\n return this._documentRootLocator.locatorForAll(\n MatMenuItemHarness.with({...filters, ancestor: `#${panelId}`}))();\n }\n return [];\n }\n\n /**\n * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.\n * @param itemFilter A filter used to represent which item in the menu should be clicked. The\n * first matching menu item will be clicked.\n * @param subItemFilters A list of filters representing the items to click in any subsequent\n * sub-menus. The first item in the sub-menu matching the corresponding filter in\n * `subItemFilters` will be clicked.\n */\n async clickItem(\n itemFilter: Omit<MenuItemHarnessFilters, 'ancestor'>,\n ...subItemFilters: Omit<MenuItemHarnessFilters, 'ancestor'>[]): Promise<void> {\n await this.open();\n const items = await this.getItems(itemFilter);\n if (!items.length) {\n throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);\n }\n\n if (!subItemFilters.length) {\n return await items[0].click();\n }\n\n const menu = await items[0].getSubmenu();\n if (!menu) {\n throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);\n }\n return menu.clickItem(...subItemFilters as [Omit<MenuItemHarnessFilters, 'ancestor'>]);\n }\n\n protected async getRootHarnessLoader(): Promise<HarnessLoader> {\n const panelId = await this._getPanelId();\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${panelId}`);\n }\n\n /** Gets the menu panel associated with this menu. */\n private async _getMenuPanel(): Promise<TestElement | null> {\n const panelId = await this._getPanelId();\n return panelId ? this._documentRootLocator.locatorForOptional(`#${panelId}`)() : null;\n }\n\n /** Gets the id of the menu panel associated with this menu. */\n private async _getPanelId(): Promise<string | null> {\n const panelId = await (await this.host()).getAttribute('aria-controls');\n return panelId || null;\n }\n}\n\n\n/** Harness for interacting with a standard mat-menu-item in tests. */\nexport class MatMenuItemHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatMenuItem` instance. */\n static hostSelector = '.mat-menu-item';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatMenuItemHarness` that meets\n * certain criteria.\n * @param options Options for filtering which menu item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: MenuItemHarnessFilters = {}): HarnessPredicate<MatMenuItemHarness> {\n return new HarnessPredicate(MatMenuItemHarness, options)\n .addOption('text', options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('hasSubmenu', options.hasSubmenu,\n async (harness, hasSubmenu) => (await harness.hasSubmenu()) === hasSubmenu);\n }\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Gets the text of the menu item. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Clicks the menu item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Whether this item has a submenu. */\n async hasSubmenu(): Promise<boolean> {\n return (await this.host()).matchesSelector(MatMenuHarness.hostSelector);\n }\n\n /** Gets the submenu associated with this menu item, or null if none. */\n async getSubmenu(): Promise<MatMenuHarness | null> {\n if (await this.hasSubmenu()) {\n return new MatMenuHarness(this.locatorFactory);\n }\n return null;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatMenuHarness` instances. */\nexport interface MenuHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose trigger text matches the given value. */\n triggerText?: string | RegExp;\n}\n\n/** A set of criteria that can be used to filter a list of `MatMenuItemHarness` instances. */\nexport interface MenuItemHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose text matches the given value. */\n text?: string | RegExp;\n /** Only find instances that have a sub-menu. */\n hasSubmenu?: boolean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './menu-harness';\nexport * from './menu-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport *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,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;SACnC;KAAA;;IAGK,KAAK;;YACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACpC;KAAA;;IAGK,IAAI;;YACR,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;SACnC;KAAA;;IAGK,SAAS;;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC;SACxC;KAAA;;IAGK,KAAK;;YACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACpC;KAAA;;IAGK,UAAU;;YACd,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,eAAe,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;SACzE;KAAA;;IAGK,UAAU;;YACd,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC3B,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aAChD;YACD,OAAO,IAAI,CAAC;SACb;KAAA;;;AA1DM,+BAAY,GAAG,gBAAgB,CAAC;;ACrJzC;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"menu__testing.js","sources":["../../../../../../src/material/menu/testing/menu-harness.ts","../../../../../../src/material/menu/testing/menu-harness-filters.ts","../../../../../../src/material/menu/testing/public-api.ts","../../../../../../src/material/menu/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n BaseHarnessFilters,\n ComponentHarness,\n ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n TestElement,\n TestKey,\n} from '@angular/cdk/testing';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MenuHarnessFilters, MenuItemHarnessFilters} from './menu-harness-filters';\n\nexport abstract class _MatMenuHarnessBase<\n ItemType extends (ComponentHarnessConstructor<Item> & {\n with: (options?: ItemFilters) => HarnessPredicate<Item>}),\n Item extends ComponentHarness & {\n click(): Promise<void>,\n getSubmenu(): Promise<_MatMenuHarnessBase<ItemType, Item, ItemFilters> | null>},\n ItemFilters extends BaseHarnessFilters\n> extends ContentContainerComponentHarness<string> {\n private _documentRootLocator = this.documentRootLocatorFactory();\n protected abstract _itemClass: ItemType;\n\n // TODO: potentially extend MatButtonHarness\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the menu is open. */\n async isOpen(): Promise<boolean> {\n return !!(await this._getMenuPanel());\n }\n\n /** Gets the text of the menu's trigger element. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Opens the menu. */\n async open(): Promise<void> {\n if (!await this.isOpen()) {\n return (await this.host()).click();\n }\n }\n\n /** Closes the menu. */\n async close(): Promise<void> {\n const panel = await this._getMenuPanel();\n if (panel) {\n return panel.sendKeys(TestKey.ESCAPE);\n }\n }\n\n /**\n * Gets a list of `MatMenuItemHarness` representing the items in the menu.\n * @param filters Optionally filters which menu items are included.\n */\n async getItems(filters?: Omit<ItemFilters, 'ancestor'>): Promise<Item[]> {\n const panelId = await this._getPanelId();\n if (panelId) {\n return this._documentRootLocator.locatorForAll(this._itemClass.with({\n ...(filters || {}),\n ancestor: `#${panelId}`\n } as ItemFilters))();\n }\n return [];\n }\n\n /**\n * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.\n * @param itemFilter A filter used to represent which item in the menu should be clicked. The\n * first matching menu item will be clicked.\n * @param subItemFilters A list of filters representing the items to click in any subsequent\n * sub-menus. The first item in the sub-menu matching the corresponding filter in\n * `subItemFilters` will be clicked.\n */\n async clickItem(\n itemFilter: Omit<ItemFilters, 'ancestor'>,\n ...subItemFilters: Omit<ItemFilters, 'ancestor'>[]): Promise<void> {\n await this.open();\n const items = await this.getItems(itemFilter);\n if (!items.length) {\n throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);\n }\n\n if (!subItemFilters.length) {\n return await items[0].click();\n }\n\n const menu = await items[0].getSubmenu();\n if (!menu) {\n throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);\n }\n return menu.clickItem(...subItemFilters as [Omit<ItemFilters, 'ancestor'>]);\n }\n\n protected async getRootHarnessLoader(): Promise<HarnessLoader> {\n const panelId = await this._getPanelId();\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${panelId}`);\n }\n\n /** Gets the menu panel associated with this menu. */\n private async _getMenuPanel(): Promise<TestElement | null> {\n const panelId = await this._getPanelId();\n return panelId ? this._documentRootLocator.locatorForOptional(`#${panelId}`)() : null;\n }\n\n /** Gets the id of the menu panel associated with this menu. */\n private async _getPanelId(): Promise<string | null> {\n const panelId = await (await this.host()).getAttribute('aria-controls');\n return panelId || null;\n }\n}\n\nexport abstract class _MatMenuItemHarnessBase<\n MenuType extends ComponentHarnessConstructor<Menu>,\n Menu extends ComponentHarness,\n> extends ContentContainerComponentHarness<string> {\n protected abstract _menuClass: MenuType;\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Gets the text of the menu item. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Clicks the menu item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Whether this item has a submenu. */\n async hasSubmenu(): Promise<boolean> {\n return (await this.host()).matchesSelector(this._menuClass.hostSelector);\n }\n\n /** Gets the submenu associated with this menu item, or null if none. */\n async getSubmenu(): Promise<Menu | null> {\n if (await this.hasSubmenu()) {\n return new this._menuClass(this.locatorFactory);\n }\n return null;\n }\n}\n\n\n/** Harness for interacting with a standard mat-menu in tests. */\nexport class MatMenuHarness extends _MatMenuHarnessBase<\n typeof MatMenuItemHarness, MatMenuItemHarness, MenuItemHarnessFilters> {\n /** The selector for the host element of a `MatMenu` instance. */\n static hostSelector = '.mat-menu-trigger';\n protected _itemClass = MatMenuItemHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatMenuHarness` that meets certain\n * criteria.\n * @param options Options for filtering which menu instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: MenuHarnessFilters = {}): HarnessPredicate<MatMenuHarness> {\n return new HarnessPredicate(MatMenuHarness, options)\n .addOption('triggerText', options.triggerText,\n (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text));\n }\n}\n\n/** Harness for interacting with a standard mat-menu-item in tests. */\nexport class MatMenuItemHarness extends\n _MatMenuItemHarnessBase<typeof MatMenuHarness, MatMenuHarness> {\n /** The selector for the host element of a `MatMenuItem` instance. */\n static hostSelector = '.mat-menu-item';\n protected _menuClass = MatMenuHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatMenuItemHarness` that meets\n * certain criteria.\n * @param options Options for filtering which menu item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: MenuItemHarnessFilters = {}): HarnessPredicate<MatMenuItemHarness> {\n return new HarnessPredicate(MatMenuItemHarness, options)\n .addOption('text', options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('hasSubmenu', options.hasSubmenu,\n async (harness, hasSubmenu) => (await harness.hasSubmenu()) === hasSubmenu);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatMenuHarness` instances. */\nexport interface MenuHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose trigger text matches the given value. */\n triggerText?: string | RegExp;\n}\n\n/** A set of criteria that can be used to filter a list of `MatMenuItemHarness` instances. */\nexport interface MenuItemHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose text matches the given value. */\n text?: string | RegExp;\n /** Only find instances that have a sub-menu. */\n hasSubmenu?: boolean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './menu-harness';\nexport * from './menu-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;MAqBsB,mBAOpB,SAAQ,gCAAwC;IAPlD;;QAQU,yBAAoB,GAAG,IAAI,CAAC,0BAA0B,EAAE,CAAC;KA8GlE;;;IAxGO,UAAU;;YACd,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;YAC9D,OAAO,qBAAqB,CAAC,MAAM,QAAQ,CAAC,CAAC;SAC9C;KAAA;;IAGK,MAAM;;YACV,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;SACvC;KAAA;;IAGK,cAAc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AG,mBAAmB,CAAC;;AAiB5C,MAAa,kBAAmB,SAC9B,uBAA8D;IADhE;;QAIY,eAAU,GAAG,cAAc,CAAC;KAevC;;;;;;;IAPC,OAAO,IAAI,CAAC,UAAkC,EAAE;QAC9C,OAAO,IAAI,gBAAgB,CAAC,kBAAkB,EAAE,OAAO,CAAC;aACnD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAC3B,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;aAC9E,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,EACvC,CAAO,OAAO,EAAE,UAAU,oDAAK,OAAA,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,UAAU,CAAA,GAAA,CAAC,CAAC;KACrF;;;AAfM,+BAAY,GAAG,gBAAgB,CAAC;;ACzNzC;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
@@ -10,29 +10,7 @@ import { coerceNumberProperty } from '@angular/cdk/coercion';
10
10
  * Use of this source code is governed by an MIT-style license that can be
11
11
  * found in the LICENSE file at https://angular.io/license
12
12
  */
13
- /** Harness for interacting with a standard mat-paginator in tests. */
14
- class MatPaginatorHarness extends ComponentHarness {
15
- constructor() {
16
- super(...arguments);
17
- this._nextButton = this.locatorFor('.mat-paginator-navigation-next');
18
- this._previousButton = this.locatorFor('.mat-paginator-navigation-previous');
19
- this._firstPageButton = this.locatorForOptional('.mat-paginator-navigation-first');
20
- this._lastPageButton = this.locatorForOptional('.mat-paginator-navigation-last');
21
- this._select = this.locatorForOptional(MatSelectHarness.with({
22
- ancestor: '.mat-paginator-page-size'
23
- }));
24
- this._pageSizeFallback = this.locatorFor('.mat-paginator-page-size-value');
25
- this._rangeLabel = this.locatorFor('.mat-paginator-range-label');
26
- }
27
- /**
28
- * Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets
29
- * certain criteria.
30
- * @param options Options for filtering which paginator instances are considered a match.
31
- * @return a `HarnessPredicate` configured with the given options.
32
- */
33
- static with(options = {}) {
34
- return new HarnessPredicate(MatPaginatorHarness, options);
35
- }
13
+ class _MatPaginatorHarnessBase extends ComponentHarness {
36
14
  /** Goes to the next page in the paginator. */
37
15
  goToNextPage() {
38
16
  return __awaiter(this, void 0, void 0, function* () {
@@ -100,6 +78,30 @@ class MatPaginatorHarness extends ComponentHarness {
100
78
  });
101
79
  }
102
80
  }
81
+ /** Harness for interacting with a standard mat-paginator in tests. */
82
+ class MatPaginatorHarness extends _MatPaginatorHarnessBase {
83
+ constructor() {
84
+ super(...arguments);
85
+ this._nextButton = this.locatorFor('.mat-paginator-navigation-next');
86
+ this._previousButton = this.locatorFor('.mat-paginator-navigation-previous');
87
+ this._firstPageButton = this.locatorForOptional('.mat-paginator-navigation-first');
88
+ this._lastPageButton = this.locatorForOptional('.mat-paginator-navigation-last');
89
+ this._select = this.locatorForOptional(MatSelectHarness.with({
90
+ ancestor: '.mat-paginator-page-size'
91
+ }));
92
+ this._pageSizeFallback = this.locatorFor('.mat-paginator-page-size-value');
93
+ this._rangeLabel = this.locatorFor('.mat-paginator-range-label');
94
+ }
95
+ /**
96
+ * Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets
97
+ * certain criteria.
98
+ * @param options Options for filtering which paginator instances are considered a match.
99
+ * @return a `HarnessPredicate` configured with the given options.
100
+ */
101
+ static with(options = {}) {
102
+ return new HarnessPredicate(MatPaginatorHarness, options);
103
+ }
104
+ }
103
105
  /** Selector used to find paginator instances. */
104
106
  MatPaginatorHarness.hostSelector = '.mat-paginator';
105
107
 
@@ -127,5 +129,5 @@ MatPaginatorHarness.hostSelector = '.mat-paginator';
127
129
  * found in the LICENSE file at https://angular.io/license
128
130
  */
129
131
 
130
- export { MatPaginatorHarness };
132
+ export { MatPaginatorHarness, _MatPaginatorHarnessBase };
131
133
  //# sourceMappingURL=testing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paginator__testing.js","sources":["../../../../../../src/material/paginator/testing/paginator-harness.ts","../../../../../../src/material/paginator/testing/paginator-harness-filters.ts","../../../../../../src/material/paginator/testing/public-api.ts","../../../../../../src/material/paginator/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {MatSelectHarness} from '@angular/material/select/testing';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {PaginatorHarnessFilters} from './paginator-harness-filters';\n\n\n/** Harness for interacting with a standard mat-paginator in tests. */\nexport class MatPaginatorHarness extends ComponentHarness {\n /** Selector used to find paginator instances. */\n static hostSelector = '.mat-paginator';\n private _nextButton = this.locatorFor('.mat-paginator-navigation-next');\n private _previousButton = this.locatorFor('.mat-paginator-navigation-previous');\n private _firstPageButton = this.locatorForOptional('.mat-paginator-navigation-first');\n private _lastPageButton = this.locatorForOptional('.mat-paginator-navigation-last');\n private _select = this.locatorForOptional(MatSelectHarness.with({\n ancestor: '.mat-paginator-page-size'\n }));\n private _pageSizeFallback = this.locatorFor('.mat-paginator-page-size-value');\n private _rangeLabel = this.locatorFor('.mat-paginator-range-label');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets\n * certain criteria.\n * @param options Options for filtering which paginator instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: PaginatorHarnessFilters = {}): HarnessPredicate<MatPaginatorHarness> {\n return new HarnessPredicate(MatPaginatorHarness, options);\n }\n\n /** Goes to the next page in the paginator. */\n async goToNextPage(): Promise<void> {\n return (await this._nextButton()).click();\n }\n\n /** Goes to the previous page in the paginator. */\n async goToPreviousPage(): Promise<void> {\n return (await this._previousButton()).click();\n }\n\n /** Goes to the first page in the paginator. */\n async goToFirstPage(): Promise<void> {\n const button = await this._firstPageButton();\n\n // The first page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error('Could not find first page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.');\n }\n\n return button.click();\n }\n\n /** Goes to the last page in the paginator. */\n async goToLastPage(): Promise<void> {\n const button = await this._lastPageButton();\n\n // The last page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error('Could not find last page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.');\n }\n\n return button.click();\n }\n\n /**\n * Sets the page size of the paginator.\n * @param size Page size that should be select.\n */\n async setPageSize(size: number): Promise<void> {\n const select = await this._select();\n\n // The select is only available if the `pageSizeOptions` are\n // set to an array with more than one item.\n if (!select) {\n throw Error('Cannot find page size selector in paginator. ' +\n 'Make sure that the `pageSizeOptions` have been configured.');\n }\n\n return select.clickOptions({text: `${size}`});\n }\n\n /** Gets the page size of the paginator. */\n async getPageSize(): Promise<number> {\n const select = await this._select();\n const value = select ? select.getValueText() : (await this._pageSizeFallback()).text();\n return coerceNumberProperty(await value);\n }\n\n /** Gets the text of the range labe of the paginator. */\n async getRangeLabel(): Promise<string> {\n return (await this._rangeLabel()).text();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatPaginatorHarness` instances. */\nexport interface PaginatorHarnessFilters extends BaseHarnessFilters {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './paginator-harness';\nexport * from './paginator-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;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AAM,EAAE;gBACX,MAAM,KAAK,CAAC,oDAAoD;oBACpD,mDAAmD,CAAC,CAAC;aAClE;YAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;SACvB;KAAA;;;;;IAMK,WAAW,CAAC,IAAY;;YAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;;;YAIpC,IAAI,CAAC,MAAM,EAAE;gBACX,MAAM,KAAK,CAAC,+CAA+C;oBAC/C,4DAA4D,CAAC,CAAC;aAC3E;YAED,OAAO,MAAM,CAAC,YAAY,CAAC,EAAC,IAAI,EAAE,GAAG,IAAI,EAAE,EAAC,CAAC,CAAC;SAC/C;KAAA;;IAGK,WAAW;;YACf,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;YACpC,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC;YACvF,OAAO,oBAAoB,CAAC,MAAM,KAAK,CAAC,CAAC;SAC1C;KAAA;;IAGK,aAAa;;YACjB,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC;SAC1C;KAAA;;;AApFM,gCAAY,GAAG,gBAAgB,CAAC;;ACjBzC;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"paginator__testing.js","sources":["../../../../../../src/material/paginator/testing/paginator-harness.ts","../../../../../../src/material/paginator/testing/paginator-harness-filters.ts","../../../../../../src/material/paginator/testing/public-api.ts","../../../../../../src/material/paginator/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n AsyncFactoryFn,\n ComponentHarness,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {MatSelectHarness} from '@angular/material/select/testing';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {PaginatorHarnessFilters} from './paginator-harness-filters';\n\nexport abstract class _MatPaginatorHarnessBase extends ComponentHarness {\n protected abstract _nextButton: AsyncFactoryFn<TestElement>;\n protected abstract _previousButton: AsyncFactoryFn<TestElement>;\n protected abstract _firstPageButton: AsyncFactoryFn<TestElement | null>;\n protected abstract _lastPageButton: AsyncFactoryFn<TestElement | null>;\n protected abstract _select: AsyncFactoryFn<ComponentHarness & {\n getValueText(): Promise<string>;\n clickOptions(...filters: unknown[]): Promise<void>;\n } | null>;\n protected abstract _pageSizeFallback: AsyncFactoryFn<TestElement>;\n protected abstract _rangeLabel: AsyncFactoryFn<TestElement>;\n\n /** Goes to the next page in the paginator. */\n async goToNextPage(): Promise<void> {\n return (await this._nextButton()).click();\n }\n\n /** Goes to the previous page in the paginator. */\n async goToPreviousPage(): Promise<void> {\n return (await this._previousButton()).click();\n }\n\n /** Goes to the first page in the paginator. */\n async goToFirstPage(): Promise<void> {\n const button = await this._firstPageButton();\n\n // The first page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error('Could not find first page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.');\n }\n\n return button.click();\n }\n\n /** Goes to the last page in the paginator. */\n async goToLastPage(): Promise<void> {\n const button = await this._lastPageButton();\n\n // The last page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error('Could not find last page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.');\n }\n\n return button.click();\n }\n\n /**\n * Sets the page size of the paginator.\n * @param size Page size that should be select.\n */\n async setPageSize(size: number): Promise<void> {\n const select = await this._select();\n\n // The select is only available if the `pageSizeOptions` are\n // set to an array with more than one item.\n if (!select) {\n throw Error('Cannot find page size selector in paginator. ' +\n 'Make sure that the `pageSizeOptions` have been configured.');\n }\n\n return select.clickOptions({text: `${size}`});\n }\n\n /** Gets the page size of the paginator. */\n async getPageSize(): Promise<number> {\n const select = await this._select();\n const value = select ? select.getValueText() : (await this._pageSizeFallback()).text();\n return coerceNumberProperty(await value);\n }\n\n /** Gets the text of the range labe of the paginator. */\n async getRangeLabel(): Promise<string> {\n return (await this._rangeLabel()).text();\n }\n}\n\n/** Harness for interacting with a standard mat-paginator in tests. */\nexport class MatPaginatorHarness extends _MatPaginatorHarnessBase {\n /** Selector used to find paginator instances. */\n static hostSelector = '.mat-paginator';\n protected _nextButton = this.locatorFor('.mat-paginator-navigation-next');\n protected _previousButton = this.locatorFor('.mat-paginator-navigation-previous');\n protected _firstPageButton = this.locatorForOptional('.mat-paginator-navigation-first');\n protected _lastPageButton = this.locatorForOptional('.mat-paginator-navigation-last');\n protected _select = this.locatorForOptional(MatSelectHarness.with({\n ancestor: '.mat-paginator-page-size'\n }));\n protected _pageSizeFallback = this.locatorFor('.mat-paginator-page-size-value');\n protected _rangeLabel = this.locatorFor('.mat-paginator-range-label');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets\n * certain criteria.\n * @param options Options for filtering which paginator instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: PaginatorHarnessFilters = {}): HarnessPredicate<MatPaginatorHarness> {\n return new HarnessPredicate(MatPaginatorHarness, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatPaginatorHarness` instances. */\nexport interface PaginatorHarnessFilters extends BaseHarnessFilters {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './paginator-harness';\nexport * from './paginator-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be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BAAiB,EAAE,EAAE,IAAI,EAAE,CAAC;YACvF,OAAO,oBAAoB,CAAC,MAAM,KAAK,CAAC,CAAC;SAC1C;KAAA;;IAGK,aAAa;;YACjB,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC;SAC1C;KAAA;CACF;;AAGD,MAAa,mBAAoB,SAAQ,wBAAwB;IAAjE;;QAGY,gBAAW,GAAG,IAAI,CAAC,UAAU,CAAC,gCAAgC,CAAC,CAAC;QAChE,oBAAe,GAAG,IAAI,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAAC;QACxE,qBAAgB,GAAG,IAAI,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,CAAC;QAC9E,oBAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,gCAAgC,CAAC,CAAC;QAC5E,YAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC;YAChE,QAAQ,EAAE,0BAA0B;SACrC,CAAC,CAAC,CAAC;QACM,sBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,gCAAgC,CAAC,CAAC;QACtE,gBAAW,GAAG,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;KAWvE;;;;;;;IAHC,OAAO,IAAI,CAAC,UAAmC,EAAE;QAC/C,OAAO,IAAI,gBAAgB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;KAC3D;;;AAnBM,gCAAY,GAAG,gBAAgB,CAAC;;ACnGzC;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
@@ -9,18 +9,7 @@ import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
9
9
  * Use of this source code is governed by an MIT-style license that can be
10
10
  * found in the LICENSE file at https://angular.io/license
11
11
  */
12
- /** Harness for interacting with a standard mat-radio-group in tests. */
13
- class MatRadioGroupHarness extends ComponentHarness {
14
- /**
15
- * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets
16
- * certain criteria.
17
- * @param options Options for filtering which radio group instances are considered a match.
18
- * @return a `HarnessPredicate` configured with the given options.
19
- */
20
- static with(options = {}) {
21
- return new HarnessPredicate(MatRadioGroupHarness, options)
22
- .addOption('name', options.name, this._checkRadioGroupName);
23
- }
12
+ class _MatRadioGroupHarnessBase extends ComponentHarness {
24
13
  /** Gets the name of the radio-group. */
25
14
  getName() {
26
15
  return __awaiter(this, void 0, void 0, function* () {
@@ -75,9 +64,9 @@ class MatRadioGroupHarness extends ComponentHarness {
75
64
  * Gets a list of radio buttons which are part of the radio-group.
76
65
  * @param filter Optionally filters which radio buttons are included.
77
66
  */
78
- getRadioButtons(filter = {}) {
67
+ getRadioButtons(filter) {
79
68
  return __awaiter(this, void 0, void 0, function* () {
80
- return this.locatorForAll(MatRadioButtonHarness.with(filter))();
69
+ return this.locatorForAll(this._buttonClass.with(filter))();
81
70
  });
82
71
  }
83
72
  /**
@@ -85,7 +74,7 @@ class MatRadioGroupHarness extends ComponentHarness {
85
74
  * @param filter An optional filter to apply to the child radio buttons. The first tab matching
86
75
  * the filter will be selected.
87
76
  */
88
- checkRadioButton(filter = {}) {
77
+ checkRadioButton(filter) {
89
78
  return __awaiter(this, void 0, void 0, function* () {
90
79
  const radioButtons = yield this.getRadioButtons(filter);
91
80
  if (!radioButtons.length) {
@@ -156,26 +145,29 @@ class MatRadioGroupHarness extends ComponentHarness {
156
145
  });
157
146
  }
158
147
  }
159
- /** The selector for the host element of a `MatRadioGroup` instance. */
160
- MatRadioGroupHarness.hostSelector = '.mat-radio-group';
161
- /** Harness for interacting with a standard mat-radio-button in tests. */
162
- class MatRadioButtonHarness extends ComponentHarness {
148
+ /** Harness for interacting with a standard mat-radio-group in tests. */
149
+ class MatRadioGroupHarness extends _MatRadioGroupHarnessBase {
163
150
  constructor() {
164
151
  super(...arguments);
165
- this._textLabel = this.locatorFor('.mat-radio-label-content');
166
- this._clickLabel = this.locatorFor('.mat-radio-label');
167
- this._input = this.locatorFor('input');
152
+ this._buttonClass = MatRadioButtonHarness;
168
153
  }
169
154
  /**
170
- * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets
155
+ * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets
171
156
  * certain criteria.
172
- * @param options Options for filtering which radio button instances are considered a match.
157
+ * @param options Options for filtering which radio group instances are considered a match.
173
158
  * @return a `HarnessPredicate` configured with the given options.
174
159
  */
175
160
  static with(options = {}) {
176
- return new HarnessPredicate(MatRadioButtonHarness, options)
177
- .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))
178
- .addOption('name', options.name, (harness, name) => __awaiter(this, void 0, void 0, function* () { return (yield harness.getName()) === name; }));
161
+ return new HarnessPredicate(MatRadioGroupHarness, options)
162
+ .addOption('name', options.name, this._checkRadioGroupName);
163
+ }
164
+ }
165
+ /** The selector for the host element of a `MatRadioGroup` instance. */
166
+ MatRadioGroupHarness.hostSelector = '.mat-radio-group';
167
+ class _MatRadioButtonHarnessBase extends ComponentHarness {
168
+ constructor() {
169
+ super(...arguments);
170
+ this._input = this.locatorFor('input');
179
171
  }
180
172
  /** Whether the radio-button is checked. */
181
173
  isChecked() {
@@ -257,6 +249,25 @@ class MatRadioButtonHarness extends ComponentHarness {
257
249
  });
258
250
  }
259
251
  }
252
+ /** Harness for interacting with a standard mat-radio-button in tests. */
253
+ class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {
254
+ constructor() {
255
+ super(...arguments);
256
+ this._textLabel = this.locatorFor('.mat-radio-label-content');
257
+ this._clickLabel = this.locatorFor('.mat-radio-label');
258
+ }
259
+ /**
260
+ * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets
261
+ * certain criteria.
262
+ * @param options Options for filtering which radio button instances are considered a match.
263
+ * @return a `HarnessPredicate` configured with the given options.
264
+ */
265
+ static with(options = {}) {
266
+ return new HarnessPredicate(MatRadioButtonHarness, options)
267
+ .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))
268
+ .addOption('name', options.name, (harness, name) => __awaiter(this, void 0, void 0, function* () { return (yield harness.getName()) === name; }));
269
+ }
270
+ }
260
271
  /** The selector for the host element of a `MatRadioButton` instance. */
261
272
  MatRadioButtonHarness.hostSelector = '.mat-radio-button';
262
273
 
@@ -284,5 +295,5 @@ MatRadioButtonHarness.hostSelector = '.mat-radio-button';
284
295
  * found in the LICENSE file at https://angular.io/license
285
296
  */
286
297
 
287
- export { MatRadioButtonHarness, MatRadioGroupHarness };
298
+ export { MatRadioButtonHarness, MatRadioGroupHarness, _MatRadioButtonHarnessBase, _MatRadioGroupHarnessBase };
288
299
  //# sourceMappingURL=testing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio__testing.js","sources":["../../../../../../src/material/radio/testing/radio-harness.ts","../../../../../../src/material/radio/testing/radio-harness-filters.ts","../../../../../../src/material/radio/testing/public-api.ts","../../../../../../src/material/radio/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\n/** Harness for interacting with a standard mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-radio-group';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioGroupHarnessFilters = {}): HarnessPredicate<MatRadioGroupHarness> {\n return new HarnessPredicate(MatRadioGroupHarness, options)\n .addOption('name', options.name, this._checkRadioGroupName);\n }\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string|null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<MatRadioButtonHarness|null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string|null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter: RadioButtonHarnessFilters = {}): Promise<MatRadioButtonHarness[]> {\n return this.locatorForAll(MatRadioButtonHarness.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter: RadioButtonHarnessFilters = {}): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string|null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n private static async _checkRadioGroupName(harness: MatRadioGroupHarness, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if (await harness._getGroupNameFromHost() === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`);\n }\n return true;\n }\n}\n\n/** Harness for interacting with a standard mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioButtonHarnessFilters = {}): HarnessPredicate<MatRadioButtonHarness> {\n return new HarnessPredicate(MatRadioButtonHarness, options)\n .addOption(\n 'label', options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))\n .addOption(\n 'name', options.name, async (harness, name) => (await harness.getName()) === name);\n }\n\n private _textLabel = this.locatorFor('.mat-radio-label-content');\n private _clickLabel = this.locatorFor('.mat-radio-label');\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string|null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string|null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatRadioGroupHarness` instances. */\nexport interface RadioGroupHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n\n/** A set of criteria that can be used to filter a list of `MatRadioButtonHarness` instances. */\nexport interface RadioButtonHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './radio-harness';\nexport * from './radio-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAYA;AACA,MAAa,oBAAqB,SAAQ,gBAAgB;;;;;;;IAUxD,OAAO,IAAI,CAAC,UAAoC,EAAE;QAChD,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO,CAAC;aACrD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;KACjE;;IAGK,OAAO;;YACX,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;;;;YAIpD,IAAI,QAAQ,KAAK,IAAI,EAAE;gBACrB,OAAO,QAAQ,CAAC;aACjB;;;;YAID,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC1D,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,OAAO,IAAI,CAAC;aACb;YACD,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,EAAE;gBAClD,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;aACrE;Y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;;;;;IAQK,QAAQ;;YACZ,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;SACnD;KAAA;;IAGK,YAAY;;YAChB,OAAO,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC;SACzC;KAAA;;IAGK,KAAK;;YACT,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC;SACtC;KAAA;;IAGK,IAAI;;YACR,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC;SACrC;KAAA;;IAGK,SAAS;;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC;SAC1C;KAAA;;;;;IAMK,KAAK;;YACT,IAAI,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE;gBAC7B,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC;aAC3C;SACF;KAAA;;;AAvFM,kCAAY,GAAG,mBAAmB,CAAC;;AC9J5C;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"radio__testing.js","sources":["../../../../../../src/material/radio/testing/radio-harness.ts","../../../../../../src/material/radio/testing/radio-harness-filters.ts","../../../../../../src/material/radio/testing/public-api.ts","../../../../../../src/material/radio/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AsyncFactoryFn,\n BaseHarnessFilters,\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\nexport abstract class _MatRadioGroupHarnessBase<\n ButtonType extends (ComponentHarnessConstructor<Button> & {\n with: (options?: ButtonFilters) => HarnessPredicate<Button>}),\n Button extends ComponentHarness & {\n isChecked(): Promise<boolean>, getValue(): Promise<string|null>,\n getName(): Promise<string|null>, check(): Promise<void>\n },\n ButtonFilters extends BaseHarnessFilters\n> extends ComponentHarness {\n protected abstract _buttonClass: ButtonType;\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string|null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<Button|null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string|null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: ButtonFilters): Promise<Button[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: ButtonFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string|null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(\n harness: _MatRadioGroupHarnessBase<any, any, any>, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if (await harness._getGroupNameFromHost() === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`);\n }\n return true;\n }\n}\n\n/** Harness for interacting with a standard mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends _MatRadioGroupHarnessBase<\n typeof MatRadioButtonHarness,\n MatRadioButtonHarness,\n RadioButtonHarnessFilters\n> {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-radio-group';\n protected _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioGroupHarnessFilters = {}): HarnessPredicate<MatRadioGroupHarness> {\n return new HarnessPredicate(MatRadioGroupHarness, options)\n .addOption('name', options.name, this._checkRadioGroupName);\n }\n}\n\nexport abstract class _MatRadioButtonHarnessBase extends ComponentHarness {\n protected abstract _textLabel: AsyncFactoryFn<TestElement>;\n protected abstract _clickLabel: AsyncFactoryFn<TestElement>;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string|null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string|null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n\n/** Harness for interacting with a standard mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioButtonHarnessFilters = {}): HarnessPredicate<MatRadioButtonHarness> {\n return new HarnessPredicate(MatRadioButtonHarness, options)\n .addOption('label', options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))\n .addOption('name', options.name,\n async (harness, name) => (await harness.getName()) === name);\n }\n\n protected _textLabel = this.locatorFor('.mat-radio-label-content');\n protected _clickLabel = this.locatorFor('.mat-radio-label');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatRadioGroupHarness` instances. */\nexport interface RadioGroupHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n\n/** A set of criteria that can be used to filter a list of `MatRadioButtonHarness` instances. */\nexport interface RadioButtonHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './radio-harness';\nexport * from './radio-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;MAmBsB,yBAQpB,SAAQ,gBAAgB;;IAIlB,OAAO;;YACX,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;;;;YAIpD,IAAI,QAAQ,KAAK,IAAI,EAAE;gBACrB,OAAO,QAAQ,CAAC;aACjB;;;;YAID,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC1D,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,OAAO,IAAI,CAAC;aACb;YACD,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,EAAE;gBAClD,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;aACrE;YACD,OAAO,UAAU,CAAC,CAAC,CAAE,CAAC;SACvB;KAAA;;IAGK,KAAK;;YACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;SAC9C;KAAA;;IAGK,qBAAqB;;YACzB,KAAK,IAAI,WAAW,IAAI,MAAM,IAAI,CAAC,eAAe,EAAE,EAAE;gBACpD,IAAI,MAAM,WAAW,CAAC,SAAS,EAAE,EAAE;oBACjC,OAAO,WAAW,CAAC;iBACpB;aACF;YACD,OAAO,IAAI,CAAC;SACb;KAAA;;IAGK,eAAe;;YACnB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACxD,IAAI,CAAC,YAAY,EAAE;gBACjB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,YAAY,CAAC,QAAQ,EAAE,CAAC;SAChC;KAAA;;;;;IAMK,eAAe,CAAC,MAAsB;;YAC1C,OAAO,IAAI,C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