This patch adds some unit tests for egGrid's egGridColumnsProvider,
including regression tests for LP#
1472787.
To run these tests (and all others for the web staff client)
from with a Git checkout of Evergreen:
[1] cd Open-ILS/web/js/ui/default/staff
[2] grunt test
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
--- /dev/null
+'use strict';
+
+describe('egGridColumnsProvider', function(){
+ beforeEach(module('egCoreMod'));
+ beforeEach(module('egGridMod'));
+
+ it('expand eg-grid-field wildcard paths', inject(function(egGridColumnsProvider, egIDL) {
+ egIDL.parseIDL();
+ var cols = egGridColumnsProvider.instance({
+ idlClass : "circ"
+ });
+ cols.expandPath({
+ path : "*"
+ });
+ // the next two are regression tests for LP#1472787
+ expect(cols.indexOf("grace_period")).not.toBe(-1);
+ expect(cols.indexOf(".grace_period")).toBe(-1);
+ cols.expandPath({
+ path : "usr.*"
+ });
+ expect(cols.indexOf("usr.family_name")).not.toBe(-1);
+ }));
+});