Skip to content

Commit

Permalink
iupdate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed Jul 1, 2024
1 parent 2f1daa1 commit ba46e9d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { By } from '@angular/platform-browser';

import { DaffModalCloseDirective } from './modal-close.directive';
import { DaffModalService } from '../service/modal.service';

@Component({
template: `
Expand All @@ -29,6 +30,9 @@ describe('@daffodil/design/modal | DaffModalCloseDirective', () => {
DaffModalCloseDirective,
WrapperComponent,
],
providers: [
DaffModalService,
],
})
.compileComponents();
}));
Expand Down
10 changes: 9 additions & 1 deletion libs/design/modal/src/modal/modal.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { DaffModalComponent } from './modal.component';
import { DaffModalService } from '../service/modal.service';

@Component({ template: `
<div class="daff-modal-wrapper">
<div class="custom-modal-component">
<daff-modal></daff-modal>
</div>
` })
Expand Down Expand Up @@ -54,4 +54,12 @@ describe('@daffodil/design/modal | DaffModalComponent', () => {
it('should create', () => {
expect(wrapper).toBeTruthy();
});

it('should have a role of dialog on the host element', () => {
expect(modal.role).toBe('dialog');
});

it('should set aria-modal to true on the host element', () => {
expect(modalDe.attributes['aria-modal']).toEqual('true');
});
});

0 comments on commit ba46e9d

Please sign in to comment.