[gnome-sound-recorder/testing: 46/49] mplement is_displayed check
- From: Margaret Ford <megford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/testing: 46/49] mplement is_displayed check
- Date: Wed, 29 Nov 2017 02:50:43 +0000 (UTC)
commit 60c6055c7652199f7f5a19136734beb126830a22
Author: Meg Ford <megford gnome org>
Date: Sun Mar 26 20:35:46 2017 -0500
mplement is_displayed check
tests/app_test.feature | 10 +++++-----
tests/steps/app_test.py | 15 +++++++++++++--
2 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/tests/app_test.feature b/tests/app_test.feature
index 2948bc4..0c70d5a 100644
--- a/tests/app_test.feature
+++ b/tests/app_test.feature
@@ -13,7 +13,7 @@ Feature: Smoke tests
Scenario: Preferences dialog
* Open Preferences dialog
Then Preferences UI is displayed
- Then set the volume
+ Then the h
@quit_via_app_menu
Scenario: Quit via app menu
@@ -25,7 +25,7 @@ Feature: Smoke tests
* Press the quit shortcut
Then gnome-sound-recorder is not running
- @no_recordings
- Scenario: No recordings in the Recordings folder
- Then the main window is shown
- Then the Recordings folder is present
\ No newline at end of file
+# @no_recordings
+# Scenario: No recordings in the Recordings folder
+# Then the main window is shown
+# Then the Recordings folder is present
\ No newline at end of file
diff --git a/tests/steps/app_test.py b/tests/steps/app_test.py
index cc26005..2a50ad9 100644
--- a/tests/steps/app_test.py
+++ b/tests/steps/app_test.py
@@ -16,10 +16,15 @@ from common_steps import *
def display_err(err_str):
return '{} is not displayed'.format(err_str)
+def is_displayed(ui, role, ui_string):
+ if role == 'radio button':
+ return ui(translate(ui_string), role).checked
+
+ return ui(translate(ui_string), role).showing
+
@step(u'Open About dialog')
def open_about_dialog(context):
- print(context.app)
context.execute_steps(u'* Select "About" in GApplication menu')
dialog_name = 'About Sound Recorder'
context.about_dialog = context.app.dialog(translate(dialog_name))
@@ -65,11 +70,17 @@ def open_pref_dialog(context):
def pref_ui_is_displayed(context):
ui = context.pref_dialog.child
- assert is_displayed(ui, 'ComboBoxText', 'Ogg Vorbis'), display_err('Correct codec')
+ assert is_displayed(ui, 'label', 'Ogg Vorbis'), display_err('Correct codec')
assert is_displayed(ui, 'label', 'Stereo'), display_err('Stereo label')
assert is_displayed(ui, '0.7'), display_err('Volume level')
assert is_displayed(ui, '0.7'), display_err('Mic volume level')
+@then(u'Changing codecs and channels works')
+def pref_ui_is_displayed(context):
+ ui = context.pref_dialog.child
+ pressKey('Down')
+
+
@step(u'Select "Quit" from the app menu')
def quit_is(context):
context.execute_steps(u'* Select "Quit" in GApplication menu')
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]