[eog] tests: fix Fullscreen tests



commit 6d97d9dcadede3492417bf9202f26bdb90fb0e59
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Mon Mar 9 16:01:09 2015 +0100

    tests: fix Fullscreen tests
    
    Fullscreen button moved to headerbar
    Detect fullscreen state by drawing area by position

 tests/actions.feature |    2 +-
 tests/steps/steps.py  |   11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/tests/actions.feature b/tests/actions.feature
index ac17e62..658bcdb 100644
--- a/tests/actions.feature
+++ b/tests/actions.feature
@@ -36,7 +36,7 @@ Feature: Smoke tests
   @fullscreen @fullscreen_via_menu
   Scenario: Fullscreen via menu
     * Open "/tmp/gnome-logo.png" via menu
-    * Select "View -> Fullscreen" menu
+    * Click Fullscreen button on headerbar
     Then application is displayed fullscreen
     * Press "<Esc>"
     Then application is not fullscreen anymore
diff --git a/tests/steps/steps.py b/tests/steps/steps.py
index cb1460b..081b19d 100644
--- a/tests/steps/steps.py
+++ b/tests/steps/steps.py
@@ -68,6 +68,11 @@ def rotate_image_clockwise(context):
     btn.click()
 
 
+ step(u'Click Fullscreen button on headerbar')
+def click_fullscreen(context):
+    context.app.child(translate('Fullscreen')).click()
+
+
 @step(u'Open context menu for current image')
 def open_context_menu(context):
     context.app.child(roleName='drawing area').click(button=3)
@@ -89,15 +94,11 @@ def sidepanel_displayed(context, state):
     assert actual == (state == 'displayed')
 
 
-def app_is_not_fullscreen(context):
-    import ipdb; ipdb.set_trace()
-
-
 @then(u'application is {negative:w} fullscreen anymore')
 @then(u'application is displayed fullscreen')
 def app_displayed_fullscreen(context, negative=None):
     sleep(0.5)
-    actual = not context.app.child(roleName='menu bar').showing
+    actual = context.app.child(roleName='drawing area').position[1] == 0
     assert actual == (negative is None)
 
 


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