score:5

Accepted answer

These options will probably work if you have jQuery available. Looks like your test is using the angular built-in jqLite, where those functionalities are not available.

Angular can use jQuery if it's present in your app when the application is being bootstrapped. If jQuery is not present in your script path, Angular falls back to its own implementation of the subset of jQuery that we call jQLite. - https://docs.angularjs.org/api/ng/function/angular.element

Maybe try adding jQuery to your karma config? Loading jQuery before angular should work.

e.g. in your karma config:

files: [
'libs/jquery.js',
'libs/angular.js'
]

score:0

You might get traction out of something in the neighborhood of

expect(element(by.xpath('//highcharts')).isPresent()).toBe(true);

Related Query

More Query from same tag