Merge lp:~ahayzen/music-app/remix-walkthrough-ap-skip-walkthrough into lp:~vthompson/music-app/remix-walkthrough

Proposed by Andrew Hayzen
Status: Merged
Merged at revision: 702
Proposed branch: lp:~ahayzen/music-app/remix-walkthrough-ap-skip-walkthrough
Merge into: lp:~vthompson/music-app/remix-walkthrough
Diff against target: 78 lines (+22/-1)
4 files modified
common/Walkthrough/Walkthrough.qml (+1/-0)
music-app.qml (+1/-0)
tests/autopilot/music_app/__init__.py (+16/-0)
tests/autopilot/music_app/tests/test_music.py (+4/-1)
To merge this branch: bzr merge lp:~ahayzen/music-app/remix-walkthrough-ap-skip-walkthrough
Reviewer Review Type Date Requested Status
Victor Thompson Pending
Review via email: mp+246922@code.launchpad.net

Commit message

* Skip the walkthrough when running autopilot

Description of the change

* Skip the walkthrough when running autopilot

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'common/Walkthrough/Walkthrough.qml'
2--- common/Walkthrough/Walkthrough.qml 2015-01-18 23:28:28 +0000
3+++ common/Walkthrough/Walkthrough.qml 2015-01-19 17:14:50 +0000
4@@ -77,6 +77,7 @@
5
6 color: "grey"
7 fontSize: "medium"
8+ objectName: "skipLabel"
9 width: contentWidth
10 text: i18n.tr("Skip")
11
12
13=== modified file 'music-app.qml'
14--- music-app.qml 2015-01-19 00:27:35 +0000
15+++ music-app.qml 2015-01-19 17:14:50 +0000
16@@ -1393,6 +1393,7 @@
17
18 FirstRunWalkthrough {
19 id: walkthrough
20+ objectName: "walkthroughPage"
21 visible: false
22
23 onVisibleChanged: {
24
25=== modified file 'tests/autopilot/music_app/__init__.py'
26--- tests/autopilot/music_app/__init__.py 2015-01-10 15:53:24 +0000
27+++ tests/autopilot/music_app/__init__.py 2015-01-19 17:14:50 +0000
28@@ -107,6 +107,10 @@
29 return self.main_view.wait_select_single(
30 MusicPage, objectName='tracksPage')
31
32+ def get_walkthrough_page(self):
33+ return self.main_view.wait_select_single(Walkthrough,
34+ objectName="walkthroughPage")
35+
36 @property
37 def loaded(self):
38 return (not self.main_view.select_single("ActivityIndicator",
39@@ -137,6 +141,18 @@
40 self.main_view = self.get_root_instance().select_single(MainView)
41
42
43+class Walkthrough(Page):
44+ """ Autopilot helper for the walkthrough page """
45+ def __init__(self, *args):
46+ super(Walkthrough, self).__init__(*args)
47+
48+ self.visible.wait_for(True)
49+
50+ @click_object
51+ def skip(self):
52+ return self.wait_select_single("Label", objectName="skipLabel")
53+
54+
55 class MusicAlbums():
56 """ Autopilot helper for the albums page """
57 def __init__(self, *args):
58
59=== modified file 'tests/autopilot/music_app/tests/test_music.py'
60--- tests/autopilot/music_app/tests/test_music.py 2014-11-07 23:08:29 +0000
61+++ tests/autopilot/music_app/tests/test_music.py 2015-01-19 17:14:50 +0000
62@@ -1,5 +1,5 @@
63 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
64-# Copyright 2013, 2014 Canonical
65+# Copyright 2013, 2014, 2015 Canonical
66 #
67 # This program is free software: you can redistribute it and/or modify it
68 # under the terms of the GNU General Public License version 3, as published
69@@ -47,6 +47,9 @@
70 }
71 ]
72
73+ # Skip the walkthrough for every test
74+ self.app.get_walkthrough_page().skip()
75+
76 @property
77 def player(self):
78 return self.app.player

Subscribers

People subscribed via source and target branches

to all changes: