From 22389950f9d16c275c93b17c56edbd7a68a632ac Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Dec 11 2018 15:37:29 +0000 Subject: Add new test. --- diff --git a/gnome_terminal/features/basic_tests.feature b/gnome_terminal/features/basic_tests.feature index 8cedce0..867a9ab 100644 --- a/gnome_terminal/features/basic_tests.feature +++ b/gnome_terminal/features/basic_tests.feature @@ -109,3 +109,10 @@ Feature: Basic tests When click on View button And click on Show Menubar button Then the menu bar disappears + + @open_preferences + Scenario: open the Preferences menu + Given Run gnome-terminal + When click on Edit button + And click on Preferences button + Then the Preferences frame appears diff --git a/gnome_terminal/features/steps/.steps.py.swp b/gnome_terminal/features/steps/.steps.py.swp index 402fbb2..eaf0ae5 100644 Binary files a/gnome_terminal/features/steps/.steps.py.swp and b/gnome_terminal/features/steps/.steps.py.swp differ diff --git a/gnome_terminal/features/steps/steps.py b/gnome_terminal/features/steps/steps.py index d995767..bc16406 100755 --- a/gnome_terminal/features/steps/steps.py +++ b/gnome_terminal/features/steps/steps.py @@ -135,6 +135,17 @@ def menu_bar_invisible(context): mBar = context.app.instance.findChild(lambda x: x.roleName == 'menu bar') assert mBar.visible == False, 'The menu bar has not been hidden.' +@then('the {frame} frame appears') +def is_frame_open(context, frame): + frames = [x.name for x in context.app.instance.children] + found = False + for i in frames: + if frame in i: + found = True + else: + pass + assert found == True, 'A window with a title including {frame} was not found.' + @then(u'Installed page is shown') def installed_page_is_shown(context): toggle_btn_checked(context, 'All')