Commit c35d3973 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

external_test_segmenter.rb: Test that segmentation information has arrived

Highlights need segmentation informations. Waiting for identity % to appear is
not enough has it is given by another request to IMGT. This could cause some
test issues when this latter request ended before the one for the highlights

Fixes #2465
parent f80461d5
Pipeline #39979 passed with stages
in 5 minutes and 12 seconds
$b.span(:id => "toIMGTSeg" ).click
Watir::Wait.until(timeout=10) { $b.span(:class => "identityBad").exists? }
clone_info = $b.clone_info_segmenter('0')
clone_info[:identity].element(:text => "NaN%").wait_while_present
productive_title = clone_info[:axis].element(:class => 'productivity-IMGT').title
assert (productive_title.include? 'productivity'), "IMGT should tell us the productivity of the sequence"
clone_segmenter = $b.clone_in_segmenter('0')
Watir::Wait.until(timeout=10) { $b.execute_script("return typeof model.clone(0).seg.imgt['N-REGION end']") != "undefined" }
highlights = clone_segmenter.spans(:class => 'highlight_border')
assert (highlights.size >= 2 && highlights.size <= 3), "We should have the V(D)J genes highlighted, we had %d highlights" % highlights.size
for h in highlights
assert ('width').to_i >= 100), "Highlights should have a reasonable width, found to be %s" %'width')
clone_info[:identity].element(:text => "NaN%").wait_while_present
assert ((clone_info[:identity].text =~ /^[0-9\.]+%$/) == 0 ), "We should have identity rate (found: %s)" % clone_info[:identity].text
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment