From: Galen Charlton Date: Wed, 8 Jul 2015 22:24:55 +0000 (+0000) Subject: LP#1472787: add regression test X-Git-Tag: sprint4-merge-nov22~1114 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=586a83b424c0eaf898a711897f3f9232ee55eb55;p=working%2FEvergreen.git 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 --- 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); + })); +});