@@ -3,7 +3,8 @@ import { ComponentFixture, TestBed } from "@angular/core/testing";
3
3
4
4
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service" ;
5
5
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service" ;
6
- import { ToastService } from "@bitwarden/components" ;
6
+
7
+ import { ToastService } from "../" ;
7
8
8
9
import { CopyClickDirective } from "./copy-click.directive" ;
9
10
@@ -20,12 +21,14 @@ import { CopyClickDirective } from "./copy-click.directive";
20
21
#toastWithLabel
21
22
></button>
22
23
` ,
24
+ standalone : true ,
25
+ imports : [ CopyClickDirective ] ,
23
26
} )
24
27
class TestCopyClickComponent {
25
- @ViewChild ( "noToast" ) noToastButton : ElementRef < HTMLButtonElement > ;
26
- @ViewChild ( "infoToast" ) infoToastButton : ElementRef < HTMLButtonElement > ;
27
- @ViewChild ( "successToast" ) successToastButton : ElementRef < HTMLButtonElement > ;
28
- @ViewChild ( "toastWithLabel" ) toastWithLabelButton : ElementRef < HTMLButtonElement > ;
28
+ @ViewChild ( "noToast" ) noToastButton ! : ElementRef < HTMLButtonElement > ;
29
+ @ViewChild ( "infoToast" ) infoToastButton ! : ElementRef < HTMLButtonElement > ;
30
+ @ViewChild ( "successToast" ) successToastButton ! : ElementRef < HTMLButtonElement > ;
31
+ @ViewChild ( "toastWithLabel" ) toastWithLabelButton ! : ElementRef < HTMLButtonElement > ;
29
32
}
30
33
31
34
describe ( "CopyClickDirective" , ( ) => {
@@ -38,7 +41,7 @@ describe("CopyClickDirective", () => {
38
41
showToast . mockClear ( ) ;
39
42
40
43
await TestBed . configureTestingModule ( {
41
- declarations : [ CopyClickDirective , TestCopyClickComponent ] ,
44
+ imports : [ TestCopyClickComponent ] ,
42
45
providers : [
43
46
{
44
47
provide : I18nService ,
0 commit comments