Skip to content

Commit 3673b83

Browse files
CopilotLipata
andcommitted
Revert changes to custom-strategy test per request
Co-authored-by: Lipata <[email protected]>
1 parent f9c62ec commit 3673b83

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

projects/igniteui-angular-elements/src/app/custom-strategy.spec.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,15 @@ describe('Elements: ', () => {
4848
const columnEl = document.createElement("igc-column") as IgcNgElement;
4949
gridEl.appendChild(columnEl);
5050

51-
// Wait for both components to be fully initialized
51+
// TODO: Better way to wait - potentially expose the queue or observable for update on the strategy
52+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 2));
53+
5254
const gridComponent = (await gridEl.ngElementStrategy[ComponentRefKey]).instance as IgxGridComponent;
5355
const columnComponent = (await columnEl.ngElementStrategy[ComponentRefKey]).instance as IgxColumnComponent;
54-
55-
// Wait for the grid's columnList to contain the column component with retry logic
56-
let retries = 0;
57-
const maxRetries = 10;
58-
const retryDelay = 10;
59-
60-
while (retries < maxRetries && !gridComponent.columnList.toArray().includes(columnComponent)) {
61-
await firstValueFrom(timer(retryDelay));
62-
retries++;
63-
}
64-
6556
expect(gridComponent.columnList.toArray()).toContain(columnComponent);
6657

6758
columnEl.remove();
68-
69-
// Wait for the column to be removed from the columnList with retry logic
70-
retries = 0;
71-
while (retries < maxRetries && gridComponent.columnList.toArray().includes(columnComponent)) {
72-
await firstValueFrom(timer(retryDelay));
73-
retries++;
74-
}
75-
59+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY: DESTROY + QUERY */ * 3));
7660
expect(gridComponent.columnList.toArray()).toEqual([]);
7761
});
7862

0 commit comments

Comments
 (0)