akveo / akveo/nebular

nbTooltip in Angular test

オープン
#2,807 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
8.1k
フォーク
1.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

### Issue type

**I'm submitting a ...** (check one with "x")

* [ ] bug report
* [ ] feature request

### Issue description

Hi, great job.

It's weird what happens to me I think, but in the unit tests, the tooltips don't work, for example this one in the component:

is simple, show a Tooltip in this element, but in the test, the hover show this in the browser console:

```
at NbOverlayContainerAdapter._createContainer (VM1669 vendor.js:137939)
at NbOverlayContainerAdapter.getContainerElement (VM1669 vendor.js:10816)
at NbOverlay._createHostElement (VM1669 vendor.js:12704)
at NbOverlay.create (VM1669 vendor.js:12671)
at NbOverlayService.create (VM1669 vendor.js:138534)
at NbDynamicOverlay.createOverlay (VM1669 vendor.js:150909)
at NbDynamicOverlay.show (VM1669 vendor.js:150870)
at VM1669 vendor.js:151109
at Object.next (VM1669 vendor.js:210257)
at SafeSubscriber.Subscriber._next (VM1669 vendor.js:210197)
```

Test code (only important part)

```
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule,
BrowserAnimationsModule,
MaterialModule,
HttpClientTestingModule,
NbLayoutModule,
RouterTestingModule,
NbTooltipModule,
NbThemeModule.forRoot(),
NbToastrModule.forRoot()
],
declarations: [MissionCardComponent],
providers: [{ provide: Router, useValue: router }],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents()
})
```

I guess I have to import a module in the test, any provider?Thanks

### Other information:

Browser : Chrome, Version 92.0.4515.107 (Official Build) (64-bit)
Angular: 12.1.4
Nebular: 8.0.0
Node: node v14.15.5 (npm v6.14.11)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。