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
=== modified file 'common/Walkthrough/Walkthrough.qml'
--- common/Walkthrough/Walkthrough.qml 2015-01-18 23:28:28 +0000
+++ common/Walkthrough/Walkthrough.qml 2015-01-19 17:14:50 +0000
@@ -77,6 +77,7 @@
7777
78 color: "grey"78 color: "grey"
79 fontSize: "medium"79 fontSize: "medium"
80 objectName: "skipLabel"
80 width: contentWidth81 width: contentWidth
81 text: i18n.tr("Skip")82 text: i18n.tr("Skip")
8283
8384
=== modified file 'music-app.qml'
--- music-app.qml 2015-01-19 00:27:35 +0000
+++ music-app.qml 2015-01-19 17:14:50 +0000
@@ -1393,6 +1393,7 @@
13931393
1394 FirstRunWalkthrough {1394 FirstRunWalkthrough {
1395 id: walkthrough1395 id: walkthrough
1396 objectName: "walkthroughPage"
1396 visible: false1397 visible: false
13971398
1398 onVisibleChanged: {1399 onVisibleChanged: {
13991400
=== modified file 'tests/autopilot/music_app/__init__.py'
--- tests/autopilot/music_app/__init__.py 2015-01-10 15:53:24 +0000
+++ tests/autopilot/music_app/__init__.py 2015-01-19 17:14:50 +0000
@@ -107,6 +107,10 @@
107 return self.main_view.wait_select_single(107 return self.main_view.wait_select_single(
108 MusicPage, objectName='tracksPage')108 MusicPage, objectName='tracksPage')
109109
110 def get_walkthrough_page(self):
111 return self.main_view.wait_select_single(Walkthrough,
112 objectName="walkthroughPage")
113
110 @property114 @property
111 def loaded(self):115 def loaded(self):
112 return (not self.main_view.select_single("ActivityIndicator",116 return (not self.main_view.select_single("ActivityIndicator",
@@ -137,6 +141,18 @@
137 self.main_view = self.get_root_instance().select_single(MainView)141 self.main_view = self.get_root_instance().select_single(MainView)
138142
139143
144class Walkthrough(Page):
145 """ Autopilot helper for the walkthrough page """
146 def __init__(self, *args):
147 super(Walkthrough, self).__init__(*args)
148
149 self.visible.wait_for(True)
150
151 @click_object
152 def skip(self):
153 return self.wait_select_single("Label", objectName="skipLabel")
154
155
140class MusicAlbums():156class MusicAlbums():
141 """ Autopilot helper for the albums page """157 """ Autopilot helper for the albums page """
142 def __init__(self, *args):158 def __init__(self, *args):
143159
=== modified file 'tests/autopilot/music_app/tests/test_music.py'
--- tests/autopilot/music_app/tests/test_music.py 2014-11-07 23:08:29 +0000
+++ tests/autopilot/music_app/tests/test_music.py 2015-01-19 17:14:50 +0000
@@ -1,5 +1,5 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2# Copyright 2013, 2014 Canonical2# Copyright 2013, 2014, 2015 Canonical
3#3#
4# This program is free software: you can redistribute it and/or modify it4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published5# under the terms of the GNU General Public License version 3, as published
@@ -47,6 +47,9 @@
47 }47 }
48 ]48 ]
4949
50 # Skip the walkthrough for every test
51 self.app.get_walkthrough_page().skip()
52
50 @property53 @property
51 def player(self):54 def player(self):
52 return self.app.player55 return self.app.player

Subscribers

People subscribed via source and target branches

to all changes: