mediawiki-extensions-Visual.../modules/ve-mw/test/browser/features/support/hooks.rb
Zeljko Filipin aa3c569e28 [browser test] Workaround for the problem when Cucumber hook executes twice
Bug: 56116
Change-Id: I99bf48b1452647b42edd97dc47e8664b08b7667a
2013-10-25 17:26:05 +02:00

26 lines
708 B
Ruby

at_exit do
$browser.close unless ENV['KEEP_BROWSER_OPEN'] == 'true'
end
#This is for the Headings test
Before('@edit_user_page') do
if (!$edit_user_page or !(ENV['REUSE_BROWSER'] == 'true')) and @browser
step 'I am logged in'
step 'I am at my user page'
step 'I edit the page with a string'
$edit_user_page=true
end
end
#This is for the bullets test and the indent-outdent test
Before('@make_selectable_line') do
if !$make_selectable_line or !(ENV['REUSE_BROWSER'] == 'true')
step 'I am logged in'
step 'I am at my user page'
step 'I click Edit for VisualEditor'
step 'I type in an input string'
step 'select the string'
$make_selectable_line=true
end
end