aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Kroemeke <skroemeke@luxoft.com>2019-02-15 17:13:50 +0100
committerBramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>2019-02-18 06:33:13 +0000
commit219bd36553288045b0c6c31ea8f1de3b7c18c151 (patch)
tree575c9c8090c0d3ec9c30f43c307ac7a310187650
parent1340c81d41e29e481de410ae5c57d6f0db90112f (diff)
[squish] change to a simple but robust launcher test
The launcher test used tapp, and move of grid tiles, which is not so robust yet. Deactivated these test, and added a simple launch grid item test for 2 items. Also unnecessary code of ports in tests was deleted. Change-Id: I1fa233d09a046eee1b17ffcf8c95df75e699360c Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
-rw-r--r--squishtests/suite_neptune3/shared/scripts/common/settings.py14
-rw-r--r--squishtests/suite_neptune3/tst_launcher/steps/launcher_bar.py22
-rw-r--r--squishtests/suite_neptune3/tst_launcher/test.feature64
3 files changed, 60 insertions, 40 deletions
diff --git a/squishtests/suite_neptune3/shared/scripts/common/settings.py b/squishtests/suite_neptune3/shared/scripts/common/settings.py
index 3957fe8d..a6d42c15 100644
--- a/squishtests/suite_neptune3/shared/scripts/common/settings.py
+++ b/squishtests/suite_neptune3/shared/scripts/common/settings.py
@@ -73,20 +73,6 @@ G_APP_HANDLE = {'vehicle': None,
'climate': None,
'sheets': None}
-# according to squisPorts in info.yaml of each app
-G_APP_PORTS = {'vehicle': 7778,
- 'map': 7784,
- 'tuner': 7787,
- 'settings': 7779,
- 'music': 7785,
- 'cluster': 7786,
- 'appstore': 7780,
- 'phone': 7786,
- 'calendar': 7781,
- 'climate': 7782,
- 'sheets': 7786}
-
-
SCREEN_WIDTH = 1920
SCREEN_HEIGHT = 1080
diff --git a/squishtests/suite_neptune3/tst_launcher/steps/launcher_bar.py b/squishtests/suite_neptune3/tst_launcher/steps/launcher_bar.py
index 458f7c8d..4ec3e7b8 100644
--- a/squishtests/suite_neptune3/tst_launcher/steps/launcher_bar.py
+++ b/squishtests/suite_neptune3/tst_launcher/steps/launcher_bar.py
@@ -45,12 +45,12 @@ def hook(context):
start_neptune_ui_app_w_focus("console")
-@Given("the launch bar is shown")
+@Given("the launcher bar is shown")
def step(context):
test.compare(waitForObjectExists(names.neptune_3_UI_Center_Console_launcherCenterConsole_Launcher).enabled
- , True, "launch bar exists")
+ , True, "launcher bar exists")
test.compare(waitForObjectExists(names.neptune_3_UI_Center_Console_launcherCenterConsole_Launcher).visible
- , True, "launch bar is visible")
+ , True, "launcher bar is visible")
@When("the grid icon is tapped")
@@ -67,6 +67,22 @@ def step(context, string_open):
, "open status shall be open" if open_status else "open status shall be closed")
+@When("the launcher icon '|word|' is tapped")
+def step(context, app_name):
+ found, app_idname = app.get_app_id(app_name)
+
+ if found:
+ object_name = qml.grid_delegate + app_idname
+ grid_view = waitForObject(names.neptune_UI_Center_Console_grid_GridView)
+
+ object_pointer = find_object_name_recursively(grid_view, object_name, 3)
+
+ if object_pointer is not None:
+ if object_pointer.visible:
+ pass
+ squish.tapObject(object_pointer)
+
+
@When("grid item '|word|' is tabbed and move index '|integer|' up and '|integer|' right")
def step(context, app_name, delta_up, delta_right):
if not context.userData:
diff --git a/squishtests/suite_neptune3/tst_launcher/test.feature b/squishtests/suite_neptune3/tst_launcher/test.feature
index 750d77bb..c112eef0 100644
--- a/squishtests/suite_neptune3/tst_launcher/test.feature
+++ b/squishtests/suite_neptune3/tst_launcher/test.feature
@@ -5,41 +5,59 @@ Feature: The launcher bar is configurable
visible.
In the grid it is possible by drag and drop to
- move the items and change the order
+ move the items and change the order, and
+ to launch apps directly
- Scenario: Open the grid
+ Scenario: Open the launcher grid
Given main menu is open
- And the launch bar is shown
+ And the launcher bar is shown
When the grid icon is tapped
Then the grid should be 'opened'
When the grid icon is tapped
Then the grid should be 'closed'
- Scenario Outline: Change order of several launcher icons in launcher grid
- Given main menu is open
- And the launch bar is shown
- When the grid icon is tapped
- Then the grid should be 'opened'
- When grid item '<launcher apps>' is tabbed and move index '<up>' up and '<right>' right
- And the '<launcher apps>' app index has increased by '<increase>'
- And the grid icon is tapped
+ Scenario Outline: Launch an app from launcher grid
- Examples:
- | launcher apps | up | right | increase |
- | music | 0 | 1 | 1 |
+ Given main menu is open
+ And the launcher bar is shown
+ When the grid icon is tapped
+ Then the grid should be 'opened'
+ When the launcher icon '<apps>' is tapped
+ Then the grid should be 'closed'
+ And after some '1' seconds
+
+ Examples:
+ | apps |
+ | music |
+ | phone |
+
+
+# Scenario Outline: Change order of several launcher icons in launcher grid
+#
+# Given main menu is open
+# And the launch bar is shown
+# When the grid icon is tapped
+# Then the grid should be 'opened'
+# When grid item '<launcher apps>' is tabbed and move index '<up>' up and '<right>' right
+# And the '<launcher apps>' app index has increased by '<increase>'
+# And the grid icon is tapped
+#
+# Examples:
+# | launcher apps | up | right | increase |
+# | music | 0 | 1 | 1 |
# | map | 0 | 1 | 1 |
# | phone | 0 | 1 | 1 |
# | vehicle | 0 | 1 | 1 |
# | settings | 0 | 1 | 1 |
-
- Scenario: Test if launcher order in launcher bar changes due to edits
-
- Given main menu is open
- And memorize visible launchers index
- When the grid icon is tapped
- And grid item 'vehicle' is tabbed and move index '0' up and '1' right
- And the grid icon is tapped
- Then visible launcher of 'vehicle' should have changed to index '1'
+#
+# Scenario: Test if launcher order in launcher bar changes due to edits
+#
+# Given main menu is open
+# And memorize visible launchers index
+# When the grid icon is tapped
+# And grid item 'vehicle' is tabbed and move index '0' up and '1' right
+# And the grid icon is tapped
+# Then visible launcher of 'vehicle' should have changed to index '1'