Use child-counting to find Targets and Records links.
authorMike Taylor <mike@indexdata.com>
Tue, 4 Feb 2014 16:25:50 +0000 (16:25 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 4 Feb 2014 16:25:50 +0000 (16:25 +0000)
We no longer need the special IDs mkwsSwitch_targets and mkwsSwitch_records.

test/spec/mkws-pazpar2.js

index 239cc20..92230ab 100644 (file)
@@ -325,7 +325,7 @@ describe("Check switch menu Records/Targets", function () {
     });
 
     it("switch to target view", function () {
-        var click = $("a.mkwsSwitch_targets").trigger("click");
+        var click = $("div.mkwsSwitch").children('a').eq(1).trigger("click");
         debug("target view click is success: " + click.length);
         expect(click.length).toBe(1);
 
@@ -346,7 +346,7 @@ describe("Check switch menu Records/Targets", function () {
     });
 
     it("switch back to record view", function () {
-        var click = $("a.mkwsSwitch_records").trigger("click");
+        var click = $("div.mkwsSwitch").children('a').eq(0).trigger("click");
         debug("record view click is success: " + click.length);
         expect(click.length).toBe(1);