Tightened up how the tests retrieve the clipboard content from the front-end.

master
Pacman Ghost 6 years ago
parent 7fee909c9b
commit a9c1181941
  1. 7
      vasl_templates/webapp/static/utils.js
  2. 1
      vasl_templates/webapp/templates/index.html

@ -5,13 +5,6 @@ function copyToClipboard( val )
{
if ( getUrlParam( "store_clipboard" ) ) {
// store the value where the tests can retrieve it
var $elem = $("#_clipboard_") ;
if ( $elem.length === 0 ) {
// NOTE: The <div> we store the message in must be visible, otherwise
// Selenium doesn't return any text for it :-/
$elem = $( "<textarea id='_clipboard_' style='z-index-999;'></textarea>" ) ;
$("body").append( $elem ) ;
}
$("#_clipboard_").text( val ) ;
return ;
}

@ -246,6 +246,7 @@ gOrdnanceListingsUrl = "{{url_for('get_ordnance_listings')}}" ;
<textarea id="_last-info_" style="display:none;"></textarea>
<textarea id="_last-warning_" style="display:none;"></textarea>
<textarea id="_last-error_" style="display:none;"></textarea>
<textarea id="_clipboard_" style="display:none;"></textarea>
<textarea id="_template-pack-persistence_" style="display:none;"></textarea>
<textarea id="_scenario-persistence_" style="display:none;"></textarea>

Loading…
Cancel
Save