[eog] tests: update screenshot tour



commit d719b73fd5fad0baa9270c70d7facd1fe3ec2e62
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Mon Mar 9 16:28:11 2015 +0100

    tests: update screenshot tour

 tests/common_steps.py         |    2 +-
 tests/screenshot_tour.feature |   14 ++++----------
 tests/steps/steps.py          |   18 +++++++++---------
 3 files changed, 14 insertions(+), 20 deletions(-)
---
diff --git a/tests/common_steps.py b/tests/common_steps.py
index 194d0c4..cd20ccc 100644
--- a/tests/common_steps.py
+++ b/tests/common_steps.py
@@ -285,5 +285,5 @@ def close_gmenu(context):
 
 @step(u'Click "{name}" in GApplication menu')
 def click_menu(context, name):
-    GnomeShell().clickApplicationMenuItem('Image Viewer', name)
+    GnomeShell().clickApplicationMenuItem('Image Viewer', translate(name))
     doDelay(2)
diff --git a/tests/screenshot_tour.feature b/tests/screenshot_tour.feature
index 61e75ef..89784a2 100644
--- a/tests/screenshot_tour.feature
+++ b/tests/screenshot_tour.feature
@@ -4,11 +4,8 @@ Feature: Screenshot tour
     Scenario Outline: Main dialogs
      * Set locale to "<locale>"
      * Make sure that eog is running
-     * Select and close "Image" menu
-     * Select and close "Edit" menu
-     * Select and close "View" menu
-     * Select and close "Go" menu
-     * Select and close "Help" menu
+     * Open and close About dialog
+     * Open and close hamburger menu
      * Open "/tmp/gnome-logo.png" via menu
      * Open context menu for current image
 
@@ -26,11 +23,8 @@ Feature: Screenshot tour
     Scenario Outline: Main dialogs
      * Set locale to "<locale>"
      * Make sure that eog is running
-     * Select and close "Image" menu
-     * Select and close "Edit" menu
-     * Select and close "View" menu
-     * Select and close "Go" menu
-     * Select and close "Help" menu
+     * Open and close About dialog
+     * Open and close hamburger menu
      * Open "/tmp/gnome-logo.png" via menu
      * Open context menu for current image
 
diff --git a/tests/steps/steps.py b/tests/steps/steps.py
index 081b19d..3470a00 100644
--- a/tests/steps/steps.py
+++ b/tests/steps/steps.py
@@ -16,6 +16,12 @@ def open_about_dialog(context):
     context.about_dialog = context.app.dialog(translate('About Image Viewer'))
 
 
+ step(u'Open and close About dialog')
+def open_and_close_about_dialog(context):
+    context.execute_steps(u'* Click "About" in GApplication menu')
+    keyCombo("<Esc>")
+
+
 @then(u'Website link to wiki is displayed')
 def website_link_to_wiki_is_displayed(context):
     assert context.about_dialog.child(translate('Website')).showing
@@ -146,18 +152,12 @@ def select_menuitem(context, menu):
     current.menuItem(translate(menu_item[-1])).click()
 
 
- step(u'Select and close "{menu}" menu')
-def select_menuitem_and_close_it(context, menu):
-    context.execute_steps('* Select "%s" menu' % menu)
+ step(u'Open and close hamburger menu')
+def select_hamburger_and_close_it(context):
+    context.app.child('Menu').click()
     keyCombo("<Esc>")
 
 
- step(u'Open "Image -> Save As" menu')
-def open_save_as_menu(context):
-    context.app.menu(translate("Image")).click()
-    context.app.menu(translate("Image")).findChildren(lambda x: 'Save As' in x.name)[0].click()
-
-
 @step(u'Select "{name}" window')
 def select_name_window(context, name):
     context.app = context.app.child(roleName='frame', name=translate(name))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]