sul-dlss/sw_index_tests — pull request #44 by lmcglohon (2014-09-06 14:46:43+00:00)
Title: Fixed multiple tests

1) advanced search subject and keyword subject -congresses, keyword IEEE xplore subject NOT congresses and keyword
Failure/Error: resp.should have_at_most(1550).results
expected at most 1550 results, got 1554
# ./spec/advanced_search_spec.rb:119:in `block (4 levels) in '

2) Korean: Unigram Searches title 창 (window) behaves like expected result size title search has between 550 and 630 results
Failure/Error: resp.should have_at_most(max).results
expected at most 630 results, got 633
Shared Example Group: "expected result size" called from ./spec/cjk/korean_unigram_spec.rb:8
# ./spec/support/shared_examples_cjk.rb:8:in `block (2 levels) in '

3) journal/newspaper titles Nature behaves like great results for format journal behaves like everything query, format journal behaves like great search results exact title matches should be first
Failure/Error: resp.should include(exp_ids).in_first(exp_ids.size + 2) # a little slop built in
expected response to include documents ["10263656", "3195844", "8829478", "466281", "370787"] in first 7 results: {"responseHeader"=>{"status"=>0, "QTime"=>156, "params"=>{"facet"=>"false", "fl"=>"id,title_245a_display", "q"=>"Nature", "testing"=>"sw_index_test", "wt"=>"ruby", "fq"=>"format:Journal/Periodical"}}, "response"=>{"numFound"=>3525, "start"=>0, "docs"=>[{"id"=>"10595973", "title_245a_display"=>"Nature"}, {"title_245a_display"=>"Nature", "id"=>"3195844"}, {"id"=>"9451387", "title_245a_display"=>"Nature"}, {"id"=>"9763775", "title_245a_display"=>"Nature"}, {"id"=>"8829478", "title_245a_display"=>"Nature"}, {"id"=>"466281", "title_245a_display"=>"Nature"}, {"id"=>"370787", "title_245a_display"=>"Nature"}, {"id"=>"10278206", "title_245a_display"=>"Nature genetics"}, {"id"=>"9930191", "title_245a_display"=>"Nature reviews"}, {"title_245a_display"=>"Nature magazine", "id"=>"370790"}, {"title_245a_display"=>"Nature conservation", "id"=>"4028082"}, {"id"=>"9930189", "title_245a_display"=>"Nature reviews"}, {"id"=>"10575395", "title_245a_display"=>"Nature reviews"}, {"id"=>"10188361", "title_245a_display"=>"Nature reviews"}, {"id"=>"9930192", "title_245a_display"=>"Nature reviews"}, {"id"=>"9930193", "title_245a_display"=>"Nature reviews"}, {"id"=>"9930185", "title_245a_display"=>"Nature reviews"}, {"id"=>"9930188", "title_245a_display"=>"Nature reviews"}, {"title_245a_display"=>"Nature & faune", "id"=>"10248818"}, {"id"=>"10372344", "title_245a_display"=>"Nature protocols"}]}}
Diff:
@@ -1,2 +1,35 @@
-[["10263656", "3195844", "8829478", "466281", "370787"]]
+{"responseHeader"=>
+ {"status"=>0,
+ "QTime"=>156,
+ "params"=>
+ {"facet"=>"false",
+ "fl"=>"id,title_245a_display",
+ "q"=>"Nature",
+ "testing"=>"sw_index_test",
+ "wt"=>"ruby",
+ "fq"=>"format:Journal/Periodical"}},
+ "response"=>
+ {"numFound"=>3525,
+ "start"=>0,
+ "docs"=>
+ [{"id"=>"10595973", "title_245a_display"=>"Nature"},
+ {"title_245a_display"=>"Nature", "id"=>"3195844"},
+ {"id"=>"9451387", "title_245a_display"=>"Nature"},
+ {"id"=>"9763775", "title_245a_display"=>"Nature"},
+ {"id"=>"8829478", "title_245a_display"=>"Nature"},
+ {"id"=>"466281", "title_245a_display"=>"Nature"},
+ {"id"=>"370787", "title_245a_display"=>"Nature"},
+ {"id"=>"10278206", "title_245a_display"=>"Nature genetics"},
+ {"id"=>"9930191", "title_245a_display"=>"Nature reviews"},
+ {"title_245a_display"=>"Nature magazine", "id"=>"370790"},
+ {"title_245a_display"=>"Nature conservation", "id"=>"4028082"},
+ {"id"=>"9930189", "title_245a_display"=>"Nature reviews"},
+ {"id"=>"10575395", "title_245a_display"=>"Nature reviews"},
+ {"id"=>"10188361", "title_245a_display"=>"Nature reviews"},
+ {"id"=>"9930192", "title_245a_display"=>"Nature reviews"},
+ {"id"=>"9930193", "title_245a_display"=>"Nature reviews"},
+ {"id"=>"9930185", "title_245a_display"=>"Nature reviews"},
+ {"id"=>"9930188", "title_245a_display"=>"Nature reviews"},
+ {"title_245a_display"=>"Nature & faune", "id"=>"10248818"},
+ {"id"=>"10372344", "title_245a_display"=>"Nature protocols"}]}}

Shared Example Group: "great search results" called from ./spec/journal_title_spec.rb:24
# ./spec/journal_title_spec.rb:12:in `block (3 levels) in '

4) journal/newspaper titles Nature behaves like great results for format journal behaves like title query, format journal behaves like great search results exact title matches should be first
Failure/Error: resp.should include(exp_ids).in_first(exp_ids.size + 2) # a little slop built in
expected response to include documents ["10263656", "3195844", "8829478", "466281", "370787"] in first 7 results: {"responseHeader"=>{"status"=>0, "QTime"=>2, "params"=>{"facet"=>"false", "fl"=>"id,title_245a_display", "q"=>"{!qf=$qf_title pf=$pf_title pf3=$pf3_title pf2=$pf2_title}Nature", "testing"=>"sw_index_test", "qt"=>"search", "wt"=>"ruby", "fq"=>"format:Journal/Periodical"}}, "response"=>{"numFound"=>1254, "start"=>0, "docs"=>[{"id"=>"10595973", "title_245a_display"=>"Nature"}, {"title_245a_display"=>"Nature", "id"=>"3195844"}, {"id"=>"9763775", "title_245a_display"=>"Nature"}, {"id"=>"9451387", "title_245a_display"=>"Nature"}, {"id"=>"8829478", "title_245a_display"=>"Nature"}, {"id"=>"466281", "title_245a_display"=>"Nature"}, {"id"=>"370787", "title_245a_display"=>"Nature"}, {"title_245a_display"=>"Da zi ran =", "id"=>"10524536"}, {"id"=>"10278206", "title_245a_display"=>"Nature genetics"}, {"id"=>"10263181", "title_245a_display"=>"Nature chemistry"}, {"id"=>"9604299", "title_245a_display"=>"Nature nanotechnology"}, {"id"=>"10372344", "title_245a_display"=>"Nature protocols"}, {"id"=>"9603973", "title_245a_display"=>"Nature methods"}, {"id"=>"10275638", "title_245a_display"=>"Nature immunology"}, {"id"=>"10274682", "title_245a_display"=>"Nature neuroscience"}, {"id"=>"10275297", "title_245a_display"=>"Nature biotechnology"}, {"id"=>"10279062", "title_245a_display"=>"Nature medicine"}, {"id"=>"9930191", "title_245a_display"=>"Nature reviews"}, {"id"=>"9930189", "title_245a_display"=>"Nature reviews"}, {"title_245a_display"=>"Nature magazine", "id"=>"370790"}]}}
Diff:
@@ -1,2 +1,36 @@
-[["10263656", "3195844", "8829478", "466281", "370787"]]
+{"responseHeader"=>
+ {"status"=>0,
+ "QTime"=>2,
+ "params"=>
+ {"facet"=>"false",
+ "fl"=>"id,title_245a_display",
+ "q"=>"{!qf=$qf_title pf=$pf_title pf3=$pf3_title pf2=$pf2_title}Nature",
+ "testing"=>"sw_index_test",
+ "qt"=>"search",
+ "wt"=>"ruby",
+ "fq"=>"format:Journal/Periodical"}},
+ "response"=>
+ {"numFound"=>1254,
+ "start"=>0,
+ "docs"=>
+ [{"id"=>"10595973", "title_245a_display"=>"Nature"},
+ {"title_245a_display"=>"Nature", "id"=>"3195844"},
+ {"id"=>"9763775", "title_245a_display"=>"Nature"},
+ {"id"=>"9451387", "title_245a_display"=>"Nature"},
+ {"id"=>"8829478", "title_245a_display"=>"Nature"},
+ {"id"=>"466281", "title_245a_display"=>"Nature"},
+ {"id"=>"370787", "title_245a_display"=>"Nature"},
+ {"title_245a_display"=>"Da zi ran =", "id"=>"10524536"},
+ {"id"=>"10278206", "title_245a_display"=>"Nature genetics"},
+ {"id"=>"10263181", "title_245a_display"=>"Nature chemistry"},
+ {"id"=>"9604299", "title_245a_display"=>"Nature nanotechnology"},
+ {"id"=>"10372344", "title_245a_display"=>"Nature protocols"},
+ {"id"=>"9603973", "title_245a_display"=>"Nature methods"},
+ {"id"=>"10275638", "title_245a_display"=>"Nature immunology"},
+ {"id"=>"10274682", "title_245a_display"=>"Nature neuroscience"},
+ {"id"=>"10275297", "title_245a_display"=>"Nature biotechnology"},
+ {"id"=>"10279062", "title_245a_display"=>"Nature medicine"},
+ {"id"=>"9930191", "title_245a_display"=>"Nature reviews"},
+ {"id"=>"9930189", "title_245a_display"=>"Nature reviews"},
+ {"title_245a_display"=>"Nature magazine", "id"=>"370790"}]}}

Shared Example Group: "great search results" called from ./spec/journal_title_spec.rb:40
# ./spec/journal_title_spec.rb:12:in `block (3 levels) in '

5) hyphen in queries 'Color-blindness; its dangers and its detection' behaves like hyphens without spaces imply phrase should have great results for query
Failure/Error: @resp.should include(exp_ids).in_first(first_x).documents
expected response to include documents ["7329437", "2323785"] in first 2 results: {"responseHeader"=>{"status"=>0, "QTime"=>6657, "params"=>{"facet"=>"false", "fl"=>"id", "q"=>"Color-blindness; its dangers and its detection", "testing"=>"sw_index_test", "wt"=>"ruby"}}, "response"=>{"numFound"=>2, "start"=>0, "docs"=>[{"id"=>"2323785"}, {"id"=>"10603445"}]}}
Diff:
@@ -1,2 +1,12 @@
-[["7329437", "2323785"]]
+{"responseHeader"=>
+ {"status"=>0,
+ "QTime"=>6657,
+ "params"=>
+ {"facet"=>"false",
+ "fl"=>"id",
+ "q"=>"Color-blindness; its dangers and its detection",
+ "testing"=>"sw_index_test",
+ "wt"=>"ruby"}},
+ "response"=>
+ {"numFound"=>2, "start"=>0, "docs"=>[{"id"=>"2323785"}, {"id"=>"10603445"}]}}

Shared Example Group: "hyphens without spaces imply phrase" called from ./spec/punctuation/hyphen_spec.rb:306
# ./spec/punctuation/hyphen_spec.rb:32:in `block (3 levels) in '

6) hyphen in queries 'Color-blindness [print/digital]; its dangers and its detection' should have great results for query
Failure/Error: @resp.should include(exp_ids).in_first(first_x).documents
expected response to include documents ["7329437", "2323785"] in first 2 results: {"responseHeader"=>{"status"=>0, "QTime"=>4079, "params"=>{"facet"=>"false", "fl"=>"id", "q"=>"Color-blindness [print/digital]; its dangers and its detection", "testing"=>"sw_index_test", "wt"=>"ruby"}}, "response"=>{"numFound"=>2, "start"=>0, "docs"=>[{"id"=>"10603445"}, {"id"=>"2323785"}]}}
Diff:
@@ -1,2 +1,12 @@
-[["7329437", "2323785"]]
+{"responseHeader"=>
+ {"status"=>0,
+ "QTime"=>4079,
+ "params"=>
+ {"facet"=>"false",
+ "fl"=>"id",
+ "q"=>"Color-blindness [print/digital]; its dangers and its detection",
+ "testing"=>"sw_index_test",
+ "wt"=>"ruby"}},
+ "response"=>
+ {"numFound"=>2, "start"=>0, "docs"=>[{"id"=>"10603445"}, {"id"=>"2323785"}]}}

# ./spec/punctuation/hyphen_spec.rb:340:in `block (3 levels) in '

@ndushay @lauraw15