From b3a8a8a4adfaa2c0b5b29228112709c94ff5e094 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 7 Apr 2014 17:27:18 +0100 Subject: [PATCH] Fix jQuery selectors for new, cleaner representation of facets. I may not have caught them all -- test doesn't run cleanly. --- test/spec/mkws-pazpar2.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); }); }); -- 1.7.10.4