[gnome-boxes/wip/automated-tests] tmp
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/automated-tests] tmp
- Date: Tue, 27 Jan 2015 14:08:36 +0000 (UTC)
commit 625d58a9ab876c166a0e4d6948d01b14d7e941d2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sun Jan 25 14:57:49 2015 +0000
tmp
Port tests to 3.15 branch
tests/general.feature | 4 ++--
tests/livecd.feature | 3 ++-
tests/steps/creation.py | 5 ++---
tests/steps/general.py | 8 +++++---
tests/steps/snapshot.py | 2 +-
5 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/tests/general.feature b/tests/general.feature
index b56c60b..dee2f09 100644
--- a/tests/general.feature
+++ b/tests/general.feature
@@ -59,7 +59,7 @@ Feature: General
* Select "Core-5" box
* Press "Properties"
* Rename "Core-5" to "Kernel-6" via "button"
- * Press "Back"
+ * Hit "Esc"
* Quit Boxes
* Start Boxes
Then Box "Kernel-6" "does" exist
@@ -70,7 +70,7 @@ Feature: General
* Select "Core-5" box
* Press "Properties"
* Rename "Core-5" to "Kernel-6" via "label"
- * Press "Back"
+ * Hit "Esc"
* Quit Boxes
* Start Boxes
Then Box "Kernel-6" "does" exist
diff --git a/tests/livecd.feature b/tests/livecd.feature
index 0f87b25..5b27f58 100644
--- a/tests/livecd.feature
+++ b/tests/livecd.feature
@@ -135,6 +135,7 @@ Feature: LiceCD
* Create new box "Core-5"
* Select "Core-5" box
* Press "Properties"
+ * Hit "Right"
* Press "Force Shutdown"
* Press "Shutdown" in alert
Then Box "Core-5" "does" exist
@@ -147,7 +148,7 @@ Feature: LiceCD
* Press "Properties"
* Press "Force Shutdown"
* Press "Cancel" in alert
- * Press "Back"
+ * Hit "Esc"
Then Box "Core-5" "does" exist
Then Ping "Core-5"
diff --git a/tests/steps/creation.py b/tests/steps/creation.py
index 0ce25d3..5faff8f 100644
--- a/tests/steps/creation.py
+++ b/tests/steps/creation.py
@@ -27,10 +27,9 @@ def create_new_vm_via_file(context, location):
context.app.child('Continue').click()
context.app.child('Select a file').click()
- selector = context.app.child('Select a device or ISO file')
for item in path:
- selector.child(item).click()
- selector.child('Open').click()
+ context.app.child(item).click()
+ context.app.child('Open').click()
@step('Create new box from url "{url}"')
def create_new_vm_via_url(context, url):
diff --git a/tests/steps/general.py b/tests/steps/general.py
index 30c9401..53a8405 100644
--- a/tests/steps/general.py
+++ b/tests/steps/general.py
@@ -39,11 +39,10 @@ def customize_vm(context):
context.app.child('Customize…').click()
sleep(0.5)
pressKey('Tab')
- pressKey('Tab')
pressKey('Page_Up')
pressKey('Page_Up')
- context.app.children[0].children[0].children[3].child('Back').click()
+ context.app.findChildren(lambda x: x.name == 'Back' and x.showing)[0].click()
sleep(0.5)
@step('Go into "{vm}" box')
@@ -133,10 +132,13 @@ def save_ip_for_vm(context, vm):
@step('Select "{vm}" box')
def select_vm(context, vm):
+ select_button = context.app.child('Select Items')
+ if select_button.showing:
+ select_button.click()
pane = context.app.child(roleName='layered pane')
for child in pane.children:
if child.text == vm:
- child.click(button='3')
+ child.click()
sleep(0.2)
break
diff --git a/tests/steps/snapshot.py b/tests/steps/snapshot.py
index 0a6cc9b..bb2ec2f 100644
--- a/tests/steps/snapshot.py
+++ b/tests/steps/snapshot.py
@@ -46,7 +46,7 @@ def create_snapshot(context, snap_name, vm_name):
* Press "Properties"
* Press "Snapshots"
* Add Snapshot named "%s"
- * Press "Back"
+ * Hit "Esc"
""" %(vm_name, snap_name))
@step('Delete machines "{vm_name}" snapshot "{snap_name}"')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]