Commit e3c08d0d authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[#654] Removed warnings in the ng tests

parent 8b666330
......@@ -11,6 +11,7 @@ module.exports = function (config) {
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-spec-reporter'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
......@@ -20,7 +21,7 @@ module.exports = function (config) {
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
reporters: ['progress', 'kjhtml', 'spec'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
......
......@@ -9537,6 +9537,15 @@
"source-map-support": "^0.5.5"
}
},
"karma-spec-reporter": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/karma-spec-reporter/-/karma-spec-reporter-0.0.33.tgz",
"integrity": "sha512-xRVevDUkiIVhKbDQ3CmeGEpyzA4b3HeVl95Sx5yJAvurpdKUSYF6ZEbQOqKJ7vrtDniABV1hyFez9KX9+7ruBA==",
"dev": true,
"requires": {
"colors": "1.4.0"
}
},
"kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
......
......@@ -59,6 +59,7 @@
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-spec-reporter": "0.0.33",
"prettier": "^2.1.1",
"protractor": "^7.0.0",
"ts-node": "^8.10.2",
......
......@@ -52,7 +52,7 @@ describe('GlobalSearchComponent', () => {
}
// Show search result box, by default it is hidden
component.searchResultsBox.show({})
component.searchResultsBox.show(new Event('click'), fixture.nativeElement)
await fixture.whenRenderingDone()
fixture.detectChanges()
......
......@@ -29,6 +29,7 @@ import { OverlayPanelModule } from 'primeng/overlaypanel'
import { ConfigReviewPanelComponent } from '../config-review-panel/config-review-panel.component'
import { HelpTipComponent } from '../help-tip/help-tip.component'
import { AppOverviewComponent } from '../app-overview/app-overview.component'
import { ButtonModule } from 'primeng/button'
class Details {
daemons: any = [
......@@ -102,6 +103,7 @@ describe('KeaAppTabComponent', () => {
NoopAnimationsModule,
PaginatorModule,
OverlayPanelModule,
ButtonModule,
],
declarations: [
KeaAppTabComponent,
......
......@@ -237,15 +237,7 @@ describe('MachinesPageComponent', () => {
const menuButton = fixture.debugElement.query(By.css('#show-machines-menu'))
expect(menuButton).not.toBeNull()
// This call throws
// ERROR: 'ERROR', TypeError: Cannot read properties of null (reading 'offsetHeight')
// from the PrimeNG menu code but the test pass through.
menuButton.triggerEventHandler(
'click',
new PointerEvent('click', {
relatedTarget: menuButton.nativeElement,
})
)
menuButton.triggerEventHandler('click', { currentTarget: menuButton.nativeElement })
await fixture.whenStable()
await fixture.whenRenderingDone()
fixture.detectChanges()
......
......@@ -135,5 +135,6 @@ describe('subnets', () => {
// Assert
// No throw
expect().nothing()
})
})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment