From 93d94cefd47374db5ec5f4754ed015ab3dc6317f Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Dec 07 2018 15:08:15 +0000 Subject: Add new functions. --- diff --git a/gnome_terminal/features/basic_tests.feature b/gnome_terminal/features/basic_tests.feature index d14e03e..9f59b38 100644 --- a/gnome_terminal/features/basic_tests.feature +++ b/gnome_terminal/features/basic_tests.feature @@ -55,46 +55,10 @@ Feature: Basic tests And press Close Window shortcut Then active window closes - - - - - - - # - # @gmenu_quit - # Scenario: GApplication menu - quit - # * Run gnome-software - # * Make sure that content is loaded - # * Click "Quit" in GApplication menu - # Then gnome-software shouldn't be running anymore - # - # @gmenu_about - # Scenario: GApplication menu - about - # * Run gnome-software - # * Make sure that content is loaded - # * Click "About" in GApplication menu - # Then "About Software" dialog is shown - # - # @about_dialog - # Scenario: About dialog - # * Run gnome-software - # * Make sure that content is loaded - # * Click "About" in GApplication menu - # Then "About Software" dialog is shown - # * Click Credits radio on "About Software" dialog - # Then Credits is shown on "About Software" dialog - # * Click About radio on "About Software" dialog - # Then About is shown on "About Software" dialog - # - # @software_sources - # Scenario: Software sources - # * Run gnome-software - # * Make sure that content is loaded - # * Click "Software Repositories" in GApplication menu - # Then "Software Repositories" dialog is shown - # - # @start_via_command_no_warning - # Scenario: Startup Gs-WARNING package id's message - # * Start gnome-software - # * There is no message "failed to download: The package id's '' are not valid" + @set_title + Scenario: set new terminal title + Given Run gnome-terminal + When click on Terminal button + And click on Set Title ... button + And type a new title + Then terminal has new title set diff --git a/gnome_terminal/features/steps/steps.py b/gnome_terminal/features/steps/steps.py index cc66be1..fe7d7f9 100755 --- a/gnome_terminal/features/steps/steps.py +++ b/gnome_terminal/features/steps/steps.py @@ -60,7 +60,15 @@ def press_shortcut(context, option): @step('click on {button} button') def click_button(context, button): - namedButton = context.app.instance.findChild(lambda x: x.name == button) + if button == "Set Title": + mItems = app.findChildren(lambda x: x.roleName == 'menu item') + for item in mItems: + if "Set Title" in item.name: + namedButton = item + else: + pass + else: + namedButton = context.app.instance.findChild(lambda x: x.name == button) namedButton.click() @then('new tab opens')