|
1 | | -import { IgxColumnComponent, IgxGridComponent, IgxHierarchicalGridComponent } from 'igniteui-angular'; |
| 1 | +import { IgxActionStripComponent, IgxColumnComponent, IgxGridComponent, IgxHierarchicalGridComponent } from 'igniteui-angular'; |
2 | 2 | import { html } from 'lit'; |
3 | 3 | import { firstValueFrom, fromEvent, skip, timer } from 'rxjs'; |
4 | 4 | import { ComponentRefKey, IgcNgElement } from './custom-strategy'; |
@@ -235,6 +235,23 @@ describe('Elements: ', () => { |
235 | 235 | expect(grid.getColumnByVisibleIndex(1).field).toEqual('ProductName'); |
236 | 236 | }); |
237 | 237 |
|
| 238 | + it('should populate action strip actionButtons content query.', async () => { |
| 239 | + const innerHtml = ` |
| 240 | + <igc-grid id="testGrid" auto-generate> |
| 241 | + <igc-action-strip id="testStrip"> |
| 242 | + <igc-grid-editing-actions add-row="true"></igc-grid-editing-actions> |
| 243 | + </igc-action-strip> |
| 244 | + </igc-grid>`; |
| 245 | + testContainer.innerHTML = innerHtml; |
| 246 | + |
| 247 | + // TODO: Better way to wait - potentially expose the queue or observable for update on the strategy |
| 248 | + await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 3)); |
| 249 | + |
| 250 | + const actionStrip = document.querySelector<IgcNgElement>('#testStrip'); |
| 251 | + const actionStripComponent = (await actionStrip.ngElementStrategy[ComponentRefKey]).instance as IgxActionStripComponent; |
| 252 | + expect(actionStripComponent.actionButtons.toArray().length).toBeGreaterThan(0); |
| 253 | + }); |
| 254 | + |
238 | 255 | it('should not destroy action strip when row it is shown in is destroyed or cached.', async() => { |
239 | 256 | const innerHtml = ` |
240 | 257 | <igc-grid id="testGrid" auto-generate> |
|
0 commit comments