Skip to content

Commit

Permalink
feat(datagrid): unit tests pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-mladenov committed Sep 4, 2024
1 parent cea931f commit 0ad320b
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions projects/angular/src/data/datagrid/datagrid-row.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ export default function (): void {
expect(button.querySelector('cds-icon[shape^=angle-double][direction^=left]')).not.toBeNull();
}));

it('try open the hidden detail button', fakeAsync(function () {
it('check if detail button is hidden', fakeAsync(function () {
context.testComponent.hiddenIndex = 0;
tick();
context.detectChanges();
Expand All @@ -637,21 +637,6 @@ export default function (): void {
const buttons = context.clarityElement.querySelectorAll('button.datagrid-detail-caret-button');
expect(buttons.length).toBe(1);
}));

it('hidden detail button prestate details are opened', fakeAsync(function () {
context.testComponent.hiddenIndex = 0;
tick();
context.detectChanges();

context.testComponent.preState = context.testComponent.items[context.testComponent.hiddenIndex];
tick();
context.detectChanges();

const buttons = context.clarityElement.querySelectorAll('button.datagrid-detail-caret-button');
expect(buttons.length).toBe(1);

expect(context.clarityElement.querySelector('clr-dg-detail')).not.toBeNull();
}));
});
});
}
Expand Down

0 comments on commit 0ad320b

Please sign in to comment.