From 586a83b424c0eaf898a711897f3f9232ee55eb55 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 8 Jul 2015 22:24:55 +0000 Subject: [PATCH] LP#1472787: add regression test 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 Signed-off-by: Jason Stephenson --- .../js/ui/default/staff/test/unit/egGrid.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Open-ILS/web/js/ui/default/staff/test/unit/egGrid.js diff --git a/Open-ILS/web/js/ui/default/staff/test/unit/egGrid.js b/Open-ILS/web/js/ui/default/staff/test/unit/egGrid.js new file mode 100644 index 0000000000..2128daf997 --- /dev/null +++ b/Open-ILS/web/js/ui/default/staff/test/unit/egGrid.js @@ -0,0 +1,23 @@ +'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); + })); +}); -- 2.43.2