From 8c37b7abb4cd0dbc0e5d26cbb3b5047c38aef02e Mon Sep 17 00:00:00 2001 From: Gilles Dubuc Date: Wed, 11 Feb 2015 20:28:13 +0100 Subject: [PATCH] Wait for the download menu to appear before closing it In practice doing this quickly still works, but the browser test in IE catches the menu at exactly the wrong time (when it appears briefly before disappearing). Bug: T89087 Change-Id: I4076943bf33a566ec882f69d17f6a3a9f1a28002 --- tests/browser/features/mmv.download.feature | 1 + tests/browser/features/step_definitions/mmv_download_steps.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/tests/browser/features/mmv.download.feature b/tests/browser/features/mmv.download.feature index dbe222012..eefa16a41 100644 --- a/tests/browser/features/mmv.download.feature +++ b/tests/browser/features/mmv.download.feature @@ -10,6 +10,7 @@ Feature: Download menu Scenario: Clicking the image closes the download menu When I click the download icon + And the download menu appears And I click the image Then the download menu should disappear diff --git a/tests/browser/features/step_definitions/mmv_download_steps.rb b/tests/browser/features/step_definitions/mmv_download_steps.rb index 97ef9db59..a955061b1 100644 --- a/tests/browser/features/step_definitions/mmv_download_steps.rb +++ b/tests/browser/features/step_definitions/mmv_download_steps.rb @@ -43,6 +43,10 @@ When /^the download size options disappears$/ do on(E2ETestPage).mmv_download_size_menu_element.when_not_present end +When /^the download menu appears$/ do + on(E2ETestPage).mmv_download_menu_element.when_present +end + Then /^the download menu should appear$/ do expect(on(E2ETestPage).mmv_download_menu_element.when_present).to be_visible end