From: Mike Taylor Date: Mon, 7 Apr 2014 16:27:18 +0000 (+0100) Subject: Fix jQuery selectors for new, cleaner representation of facets. X-Git-Tag: 1.0.0~1000 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=b3a8a8a4adfaa2c0b5b29228112709c94ff5e094;p=mkws-moved-to-github.git Fix jQuery selectors for new, cleaner representation of facets. I may not have caught them all -- test doesn't run cleanly. --- diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 2dab391..b19b71e 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -203,28 +203,28 @@ describe("Check Termlist", function () { expect(termlist.length).toBe(1); waitsFor(function () { - return $("div.mkwsFacetSources").length == 1 ? true : false; + return $('div.mkwsFacet[data-mkws-facet="xtargets"]').length == 1 ? true : false; }, "check for facet sources", 4 * jasmine_config.second); // everything displayed? runs(function () { - var sources = $("div.mkwsFacetSources"); + var sources = $('div.mkwsFacet[data-mkws-facet="xtargets"]'); debug("Termlist sources success: " + sources.length); expect(sources.length).toBe(1); - var subjects = $("div.mkwsFacetSubjects"); + var subjects = $('div.mkwsFacet[data-mkws-facet="subject"]'); expect(subjects.length).toBe(1); - var authors = $("div.mkwsFacetAuthors"); + var authors = $('div.mkwsFacet[data-mkws-facet="author"]'); expect(authors.length).toBe(1); }); waitsFor(function () { - return $("div.mkwsFacetAuthors div.term").length >= 2 ? true : false; + return $('div.mkwsFacet[data-mkws-facet="author"] div.term').length >= 2 ? true : false; }, "At least one author link displayed", 4 * jasmine_config.second); runs(function () { - expect($("div.mkwsFacetAuthors div.term").length).toBeGreaterThan(1); + expect($('div.mkwsFacet[data-mkws-facet="author"] div.term').length).toBeGreaterThan(1); }); });