[gnome-boxes] tests: Scenario for deletion through context menu
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] tests: Scenario for deletion through context menu
- Date: Tue, 3 Feb 2015 17:42:01 +0000 (UTC)
commit cb03617a7504cdf7d1a49627f9939b5c2c456656
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Feb 3 16:51:23 2015 +0000
tests: Scenario for deletion through context menu
tests/livecd.feature | 9 +++++++++
tests/steps/general.py | 9 +++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/tests/livecd.feature b/tests/livecd.feature
index b9e6e28..6fc0286 100644
--- a/tests/livecd.feature
+++ b/tests/livecd.feature
@@ -61,6 +61,15 @@ Feature: LiceCD
Then Box "Core-5" "does not" exist
Then Cannot ping "Core-5"
+ @delete_local_livecd_box_via_context_menu
+ Scenario: Delete local liveCD box via context menu
+ * Create new box "Core-5"
+ * Launch "Delete" for "Core-5" box
+ * Close warning
+ * Wait for "sleep 1" end
+ Then Box "Core-5" "does not" exist
+ Then Cannot ping "Core-5"
+
@undo_delete_local_livecd_box
Scenario: Undo Delete of local liveCD box
* Create new box "Core-5"
diff --git a/tests/steps/general.py b/tests/steps/general.py
index 6f5ca83..b6c8697 100644
--- a/tests/steps/general.py
+++ b/tests/steps/general.py
@@ -73,6 +73,15 @@ def press_back_in_vm(context, action, vm):
buttons[1].click()
sleep(0.5)
+ step('Launch "{action}" for "{box}" box')
+def launch_action_for_box(context, action, box):
+ pane = context.app.child(roleName='layered pane')
+ item = pane.findChildren(lambda x: x.text == box and x.roleName == 'icon')[0]
+ item.click(button=3)
+ popup = context.app.findChildren(lambda x: x.name == 'Box actions' and x.roleName == 'popup menu' and
x.showing)[0]
+ popup.child(action).click()
+ sleep(0.5)
+
@step('Press "{action}" in alert')
def press_back_in_prefs(context, action):
button = context.app.child(roleName='alert').child(action)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]