Currently, I am working on testing an angular directive that acts as a wrapper for slickgrid.
'use strict';
describe('Unit: Grid Directive', function() {
var $scope;
var element;
beforeEach(module('grid'));
beforeEach(inject(function($compile, $rootScope) {
$scope = $rootScope;
element = angular.element('<grid class="slickgrid-table" id="miscGrid" query="query"/>');
$scope.query = { symbol: 'AAAA' };
$compile(element)($scope);
$scope.$digest();
}));
One issue I encountered is that slickgrid relies on jquery to locate the correct container for inserting its grid.
Error: SlickGrid requires a valid container, #miscGrid does not exist in the DOM.
My main question now is how can I resolve this issue? Is there a way to trick slickgrid into recognizing that the element being compiled is indeed a valid container?