Skip to content

Commit 4485037

Browse files
committed
main - 2438454 feat(material/chips): add (optional) edit icon to input chips (#31041)
1 parent 5e6a3a0 commit 4485037

File tree

7 files changed

+481
-11
lines changed

7 files changed

+481
-11
lines changed

docs-content/api-docs/material-chips-testing.html

Lines changed: 332 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,169 @@ <h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
163163

164164

165165

166+
<h4 id="MatChipEditHarness" class="docs-header-link docs-api-h4 docs-api-class-name">
167+
<span header-link="MatChipEditHarness"></span>
168+
<code>MatChipEditHarness</code>
169+
170+
<span class="docs-api-class-extends-clauses">
171+
<span class="docs-api-class-extends-label">extends</span>
172+
<a href="cdk/testing/api#ComponentHarness" class="docs-api-class-extends-type">
173+
ComponentHarness
174+
</a>
175+
</span>
176+
177+
</h4><p class="docs-api-class-description"><p>Harness for interacting with a standard Material chip edit button in tests.</p>
178+
</p><h5 class="docs-api-h5 docs-api-method-header">Properties</h5>
179+
<table class="docs-api-properties-table">
180+
<tr class="docs-api-properties-header-row">
181+
<th class="docs-api-properties-th">Name</th>
182+
<th class="docs-api-properties-th">Description</th>
183+
</tr>
184+
185+
186+
187+
<tr class="docs-api-properties-row">
188+
<td class="docs-api-properties-name-cell"><p class="docs-api-property-name">
189+
<code>static&nbsp;hostSelector: &#39;.mat-mdc-chip-edit&#39;</code>
190+
</p>
191+
</td>
192+
<td class="docs-api-property-description"></td>
193+
</tr>
194+
195+
196+
197+
</table>
198+
199+
200+
<h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
201+
202+
203+
204+
<table class="docs-api-method-table">
205+
<thead>
206+
<tr class="docs-api-method-name-row">
207+
<th colspan="2" class="docs-api-method-name-cell"><div class="docs-api-modifier-method-marker">
208+
async
209+
</div>click
210+
</th>
211+
</tr>
212+
</thead><tr class="docs-api-method-description-row">
213+
<td colspan="2" class="docs-api-method-description-cell">
214+
<p>Clicks the edit button.</p>
215+
216+
</td>
217+
</tr><thead>
218+
<tr class="docs-api-method-returns-header-row">
219+
<th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
220+
</tr>
221+
</thead>
222+
<tr>
223+
<td class="docs-api-method-returns-type-cell">
224+
<code class="docs-api-method-returns-type">Promise&lt;void&gt;</code>
225+
</td>
226+
<td class="docs-api-method-returns-description-cell">
227+
<p class="docs-api-method-returns-description">
228+
<p>Promise that resolves when the action completes.</p>
229+
230+
</p>
231+
</td>
232+
</tr></table>
233+
234+
235+
236+
237+
238+
<table class="docs-api-method-table">
239+
<thead>
240+
<tr class="docs-api-method-name-row">
241+
<th colspan="2" class="docs-api-method-name-cell"><div class="docs-api-modifier-method-marker">
242+
async
243+
</div>host
244+
</th>
245+
</tr>
246+
</thead><tr class="docs-api-method-description-row">
247+
<td colspan="2" class="docs-api-method-description-cell">
248+
<p>Gets a <code>Promise</code> for the <code>TestElement</code> representing the host element of the component.</p>
249+
250+
</td>
251+
</tr><thead>
252+
<tr class="docs-api-method-returns-header-row">
253+
<th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
254+
</tr>
255+
</thead>
256+
<tr>
257+
<td class="docs-api-method-returns-type-cell">
258+
<code class="docs-api-method-returns-type">Promise&lt;TestElement&gt;</code>
259+
</td>
260+
<td class="docs-api-method-returns-description-cell">
261+
<p class="docs-api-method-returns-description">
262+
263+
</p>
264+
</td>
265+
</tr></table>
266+
267+
268+
269+
270+
271+
<table class="docs-api-method-table">
272+
<thead>
273+
<tr class="docs-api-method-name-row">
274+
<th colspan="2" class="docs-api-method-name-cell"><div class="docs-api-modifier-method-marker">
275+
static
276+
</div>with
277+
</th>
278+
</tr>
279+
</thead><tr class="docs-api-method-description-row">
280+
<td colspan="2" class="docs-api-method-description-cell">
281+
<p>Gets a <code>HarnessPredicate</code> that can be used to search for a chip edit with specific
282+
attributes.</p>
283+
284+
</td>
285+
</tr><thead>
286+
<tr class="docs-api-method-parameters-header-row">
287+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
288+
</tr>
289+
</thead>
290+
291+
<tr class="docs-api-method-parameter-row">
292+
<td class="docs-api-method-parameter-cell">
293+
<p class="docs-api-method-parameter-name">
294+
options</p>
295+
<code class="docs-api-method-parameter-type">ChipEditHarnessFilters = {}</code>
296+
</td>
297+
<td class="docs-api-method-parameter-description-cell">
298+
<p class="docs-api-method-parameter-description">
299+
<p>Options for filtering which input instances are considered a match.</p>
300+
301+
</p>
302+
</td>
303+
</tr>
304+
<thead>
305+
<tr class="docs-api-method-returns-header-row">
306+
<th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
307+
</tr>
308+
</thead>
309+
<tr>
310+
<td class="docs-api-method-returns-type-cell">
311+
<code class="docs-api-method-returns-type">HarnessPredicate&lt;T&gt;</code>
312+
</td>
313+
<td class="docs-api-method-returns-description-cell">
314+
<p class="docs-api-method-returns-description">
315+
<p>a <code>HarnessPredicate</code> configured with the given options.</p>
316+
317+
</p>
318+
</td>
319+
</tr></table>
320+
321+
322+
323+
324+
325+
326+
327+
328+
166329
<h4 id="MatChipHarness" class="docs-header-link docs-api-h4 docs-api-class-name">
167330
<span header-link="MatChipHarness"></span>
168331
<code>MatChipHarness</code>
@@ -255,6 +418,58 @@ <h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
255418

256419

257420

421+
<table class="docs-api-method-table">
422+
<thead>
423+
<tr class="docs-api-method-name-row">
424+
<th colspan="2" class="docs-api-method-name-cell"><div class="docs-api-modifier-method-marker">
425+
async
426+
</div>geEditButton
427+
</th>
428+
</tr>
429+
</thead><tr class="docs-api-method-description-row">
430+
<td colspan="2" class="docs-api-method-description-cell">
431+
<p>Gets the edit button inside of a chip.</p>
432+
433+
</td>
434+
</tr><thead>
435+
<tr class="docs-api-method-parameters-header-row">
436+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
437+
</tr>
438+
</thead>
439+
440+
<tr class="docs-api-method-parameter-row">
441+
<td class="docs-api-method-parameter-cell">
442+
<p class="docs-api-method-parameter-name">
443+
filter</p>
444+
<code class="docs-api-method-parameter-type">ChipEditHarnessFilters = {}</code>
445+
</td>
446+
<td class="docs-api-method-parameter-description-cell">
447+
<p class="docs-api-method-parameter-description">
448+
<p>Optionally filters which chips are included.</p>
449+
450+
</p>
451+
</td>
452+
</tr>
453+
<thead>
454+
<tr class="docs-api-method-returns-header-row">
455+
<th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
456+
</tr>
457+
</thead>
458+
<tr>
459+
<td class="docs-api-method-returns-type-cell">
460+
<code class="docs-api-method-returns-type">Promise&lt;MatChipEditHarness&gt;</code>
461+
</td>
462+
<td class="docs-api-method-returns-description-cell">
463+
<p class="docs-api-method-returns-description">
464+
465+
</p>
466+
</td>
467+
</tr></table>
468+
469+
470+
471+
472+
258473
<table class="docs-api-method-table">
259474
<thead>
260475
<tr class="docs-api-method-name-row">
@@ -1695,6 +1910,58 @@ <h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
16951910

16961911

16971912

1913+
<table class="docs-api-method-table">
1914+
<thead>
1915+
<tr class="docs-api-method-name-row">
1916+
<th colspan="2" class="docs-api-method-name-cell"><div class="docs-api-modifier-method-marker">
1917+
async
1918+
</div>geEditButton
1919+
</th>
1920+
</tr>
1921+
</thead><tr class="docs-api-method-description-row">
1922+
<td colspan="2" class="docs-api-method-description-cell">
1923+
<p>Gets the edit button inside of a chip.</p>
1924+
1925+
</td>
1926+
</tr><thead>
1927+
<tr class="docs-api-method-parameters-header-row">
1928+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
1929+
</tr>
1930+
</thead>
1931+
1932+
<tr class="docs-api-method-parameter-row">
1933+
<td class="docs-api-method-parameter-cell">
1934+
<p class="docs-api-method-parameter-name">
1935+
filter</p>
1936+
<code class="docs-api-method-parameter-type">ChipEditHarnessFilters = {}</code>
1937+
</td>
1938+
<td class="docs-api-method-parameter-description-cell">
1939+
<p class="docs-api-method-parameter-description">
1940+
<p>Optionally filters which chips are included.</p>
1941+
1942+
</p>
1943+
</td>
1944+
</tr>
1945+
<thead>
1946+
<tr class="docs-api-method-returns-header-row">
1947+
<th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
1948+
</tr>
1949+
</thead>
1950+
<tr>
1951+
<td class="docs-api-method-returns-type-cell">
1952+
<code class="docs-api-method-returns-type">Promise&lt;MatChipEditHarness&gt;</code>
1953+
</td>
1954+
<td class="docs-api-method-returns-description-cell">
1955+
<p class="docs-api-method-returns-description">
1956+
1957+
</p>
1958+
</td>
1959+
</tr></table>
1960+
1961+
1962+
1963+
1964+
16981965
<table class="docs-api-method-table">
16991966
<thead>
17001967
<tr class="docs-api-method-name-row">
@@ -3301,6 +3568,58 @@ <h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
33013568

33023569

33033570

3571+
<table class="docs-api-method-table">
3572+
<thead>
3573+
<tr class="docs-api-method-name-row">
3574+
<th colspan="2" class="docs-api-method-name-cell"><div class="docs-api-modifier-method-marker">
3575+
async
3576+
</div>geEditButton
3577+
</th>
3578+
</tr>
3579+
</thead><tr class="docs-api-method-description-row">
3580+
<td colspan="2" class="docs-api-method-description-cell">
3581+
<p>Gets the edit button inside of a chip.</p>
3582+
3583+
</td>
3584+
</tr><thead>
3585+
<tr class="docs-api-method-parameters-header-row">
3586+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
3587+
</tr>
3588+
</thead>
3589+
3590+
<tr class="docs-api-method-parameter-row">
3591+
<td class="docs-api-method-parameter-cell">
3592+
<p class="docs-api-method-parameter-name">
3593+
filter</p>
3594+
<code class="docs-api-method-parameter-type">ChipEditHarnessFilters = {}</code>
3595+
</td>
3596+
<td class="docs-api-method-parameter-description-cell">
3597+
<p class="docs-api-method-parameter-description">
3598+
<p>Optionally filters which chips are included.</p>
3599+
3600+
</p>
3601+
</td>
3602+
</tr>
3603+
<thead>
3604+
<tr class="docs-api-method-returns-header-row">
3605+
<th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
3606+
</tr>
3607+
</thead>
3608+
<tr>
3609+
<td class="docs-api-method-returns-type-cell">
3610+
<code class="docs-api-method-returns-type">Promise&lt;MatChipEditHarness&gt;</code>
3611+
</td>
3612+
<td class="docs-api-method-returns-description-cell">
3613+
<p class="docs-api-method-returns-description">
3614+
3615+
</p>
3616+
</td>
3617+
</tr></table>
3618+
3619+
3620+
3621+
3622+
33043623
<table class="docs-api-method-table">
33053624
<thead>
33063625
<tr class="docs-api-method-name-row">
@@ -4675,6 +4994,19 @@ <h4 id="ChipSetHarnessFilters" class="docs-header-link docs-api-h4 docs-api-inte
46754994

46764995

46774996

4997+
<h4 id="ChipEditHarnessFilters" class="docs-header-link docs-api-h4 docs-api-interface-name">
4998+
<span header-link="ChipEditHarnessFilters"></span>
4999+
<code>ChipEditHarnessFilters</code>
5000+
</h4>
5001+
5002+
5003+
5004+
5005+
5006+
5007+
5008+
5009+
46785010
<h4 id="ChipRemoveHarnessFilters" class="docs-header-link docs-api-h4 docs-api-interface-name">
46795011
<span header-link="ChipRemoveHarnessFilters"></span>
46805012
<code>ChipRemoveHarnessFilters</code>

0 commit comments

Comments
 (0)