mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
[BrowserTest] Fix failing VisualEditor_save_dialog scenario
Looks like VisualEditor does not allow saving the page, if the changes to the page were made while the browser did not have focus. Change-Id: I959bcb4cc2f72237d2ea75249a56e140d4f7c867 Paired-With: Amir Aharoni
This commit is contained in:
parent
005c6fef27
commit
4ab4ad64dc
|
@ -17,7 +17,10 @@ Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, page_cont
|
|||
end
|
||||
|
||||
Given(/^I click in the editable part$/) do
|
||||
on(VisualEditorPage).content_element.when_present.send_keys("")
|
||||
on(VisualEditorPage) do |page|
|
||||
page.content_element.when_present.fire_event("onfocus")
|
||||
page.content_element.send_keys("")
|
||||
end
|
||||
end
|
||||
|
||||
Given(/^I make the text "(.*?)" be selected$/) do |select_text|
|
||||
|
@ -99,4 +102,4 @@ end
|
|||
|
||||
Then(/^I can click Cancel save$/) do
|
||||
on(VisualEditorPage).confirm_switch_cancel_element.when_present.click
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue