Merge lp:~canonical-platform-qa/ubuntu-autopilot-tests/oneline_accounts_window into lp:ubuntu-autopilot-tests

Proposed by Leo Arias
Status: Superseded
Proposed branch: lp:~canonical-platform-qa/ubuntu-autopilot-tests/oneline_accounts_window
Merge into: lp:ubuntu-autopilot-tests
Diff against target: 1264 lines (+1176/-0) (has conflicts)
16 files modified
.bzr-builddeb/default.conf (+2/-0)
COPYING (+674/-0)
README (+12/-0)
debian/changelog (+48/-0)
debian/compat (+1/-0)
debian/control (+27/-0)
debian/copyright (+28/-0)
debian/rules (+16/-0)
debian/source/format (+1/-0)
setup.py (+35/-0)
ubuntu_experience_tests/__init__.py (+17/-0)
ubuntu_experience_tests/fixture_setup.py (+30/-0)
ubuntu_experience_tests/helpers.py (+135/-0)
ubuntu_experience_tests/tests/__init__.py (+36/-0)
ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py (+58/-0)
ubuntu_experience_tests/tests/test_fixture_setup.py (+56/-0)
Conflict adding file debian.  Moved existing file to debian.moved.
Conflict adding file setup.py.  Moved existing file to setup.py.moved.
To merge this branch: bzr merge lp:~canonical-platform-qa/ubuntu-autopilot-tests/oneline_accounts_window
Reviewer Review Type Date Requested Status
Canonical Platform QA Team Pending
Ubuntu Testcase Admins Pending
Review via email: mp+231471@code.launchpad.net

This proposal has been superseded by a proposal from 2014-08-19.

Commit message

Now the online accounts ui is not a window separate from system settings.

To post a comment you must log in.

Unmerged revisions

29. By Leo Arias

Now the online accounts ui is not a window separate from system settings.

28. By PS Jenkins bot

Resync trunk

27. By PS Jenkins bot

Releasing 0.1+14.10.20140808-0ubuntu1

26. By Leo Arias

Initial commit of Debian packaging.
Approved by: Barry Warsaw, Martin Pitt

25. By Leo Arias

Updated the test to take into account the new dash app.

24. By Leo Arias

Fixed the packaging to install ubuntu_experience_tests as a py3 library.

Approved by PS Jenkins bot, Thomi Richards.

23. By Leo Arias

Fix a couple of minor issues that slipped in with the ContactsDbusService branch.

22. By Leo Arias

Ported package to python3. Removed dialer tests for now, because it is python2.

21. By Dan Chapman 

Merge: Brendan Donegan 2014-06-19 Fix call to get_vcard_uid

20. By Leo Arias

skiptest is a typo in test_osd_dialer_integration.py, should be skipTest

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.bzr-builddeb'
2=== added file '.bzr-builddeb/default.conf'
3--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
4+++ .bzr-builddeb/default.conf 2014-08-19 22:56:22 +0000
5@@ -0,0 +1,2 @@
6+[BUILDDEB]
7+split = True
8
9=== added file 'COPYING'
10--- COPYING 1970-01-01 00:00:00 +0000
11+++ COPYING 2014-08-19 22:56:22 +0000
12@@ -0,0 +1,674 @@
13+ GNU GENERAL PUBLIC LICENSE
14+ Version 3, 29 June 2007
15+
16+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
17+ Everyone is permitted to copy and distribute verbatim copies
18+ of this license document, but changing it is not allowed.
19+
20+ Preamble
21+
22+ The GNU General Public License is a free, copyleft license for
23+software and other kinds of works.
24+
25+ The licenses for most software and other practical works are designed
26+to take away your freedom to share and change the works. By contrast,
27+the GNU General Public License is intended to guarantee your freedom to
28+share and change all versions of a program--to make sure it remains free
29+software for all its users. We, the Free Software Foundation, use the
30+GNU General Public License for most of our software; it applies also to
31+any other work released this way by its authors. You can apply it to
32+your programs, too.
33+
34+ When we speak of free software, we are referring to freedom, not
35+price. Our General Public Licenses are designed to make sure that you
36+have the freedom to distribute copies of free software (and charge for
37+them if you wish), that you receive source code or can get it if you
38+want it, that you can change the software or use pieces of it in new
39+free programs, and that you know you can do these things.
40+
41+ To protect your rights, we need to prevent others from denying you
42+these rights or asking you to surrender the rights. Therefore, you have
43+certain responsibilities if you distribute copies of the software, or if
44+you modify it: responsibilities to respect the freedom of others.
45+
46+ For example, if you distribute copies of such a program, whether
47+gratis or for a fee, you must pass on to the recipients the same
48+freedoms that you received. You must make sure that they, too, receive
49+or can get the source code. And you must show them these terms so they
50+know their rights.
51+
52+ Developers that use the GNU GPL protect your rights with two steps:
53+(1) assert copyright on the software, and (2) offer you this License
54+giving you legal permission to copy, distribute and/or modify it.
55+
56+ For the developers' and authors' protection, the GPL clearly explains
57+that there is no warranty for this free software. For both users' and
58+authors' sake, the GPL requires that modified versions be marked as
59+changed, so that their problems will not be attributed erroneously to
60+authors of previous versions.
61+
62+ Some devices are designed to deny users access to install or run
63+modified versions of the software inside them, although the manufacturer
64+can do so. This is fundamentally incompatible with the aim of
65+protecting users' freedom to change the software. The systematic
66+pattern of such abuse occurs in the area of products for individuals to
67+use, which is precisely where it is most unacceptable. Therefore, we
68+have designed this version of the GPL to prohibit the practice for those
69+products. If such problems arise substantially in other domains, we
70+stand ready to extend this provision to those domains in future versions
71+of the GPL, as needed to protect the freedom of users.
72+
73+ Finally, every program is threatened constantly by software patents.
74+States should not allow patents to restrict development and use of
75+software on general-purpose computers, but in those that do, we wish to
76+avoid the special danger that patents applied to a free program could
77+make it effectively proprietary. To prevent this, the GPL assures that
78+patents cannot be used to render the program non-free.
79+
80+ The precise terms and conditions for copying, distribution and
81+modification follow.
82+
83+ TERMS AND CONDITIONS
84+
85+ 0. Definitions.
86+
87+ "This License" refers to version 3 of the GNU General Public License.
88+
89+ "Copyright" also means copyright-like laws that apply to other kinds of
90+works, such as semiconductor masks.
91+
92+ "The Program" refers to any copyrightable work licensed under this
93+License. Each licensee is addressed as "you". "Licensees" and
94+"recipients" may be individuals or organizations.
95+
96+ To "modify" a work means to copy from or adapt all or part of the work
97+in a fashion requiring copyright permission, other than the making of an
98+exact copy. The resulting work is called a "modified version" of the
99+earlier work or a work "based on" the earlier work.
100+
101+ A "covered work" means either the unmodified Program or a work based
102+on the Program.
103+
104+ To "propagate" a work means to do anything with it that, without
105+permission, would make you directly or secondarily liable for
106+infringement under applicable copyright law, except executing it on a
107+computer or modifying a private copy. Propagation includes copying,
108+distribution (with or without modification), making available to the
109+public, and in some countries other activities as well.
110+
111+ To "convey" a work means any kind of propagation that enables other
112+parties to make or receive copies. Mere interaction with a user through
113+a computer network, with no transfer of a copy, is not conveying.
114+
115+ An interactive user interface displays "Appropriate Legal Notices"
116+to the extent that it includes a convenient and prominently visible
117+feature that (1) displays an appropriate copyright notice, and (2)
118+tells the user that there is no warranty for the work (except to the
119+extent that warranties are provided), that licensees may convey the
120+work under this License, and how to view a copy of this License. If
121+the interface presents a list of user commands or options, such as a
122+menu, a prominent item in the list meets this criterion.
123+
124+ 1. Source Code.
125+
126+ The "source code" for a work means the preferred form of the work
127+for making modifications to it. "Object code" means any non-source
128+form of a work.
129+
130+ A "Standard Interface" means an interface that either is an official
131+standard defined by a recognized standards body, or, in the case of
132+interfaces specified for a particular programming language, one that
133+is widely used among developers working in that language.
134+
135+ The "System Libraries" of an executable work include anything, other
136+than the work as a whole, that (a) is included in the normal form of
137+packaging a Major Component, but which is not part of that Major
138+Component, and (b) serves only to enable use of the work with that
139+Major Component, or to implement a Standard Interface for which an
140+implementation is available to the public in source code form. A
141+"Major Component", in this context, means a major essential component
142+(kernel, window system, and so on) of the specific operating system
143+(if any) on which the executable work runs, or a compiler used to
144+produce the work, or an object code interpreter used to run it.
145+
146+ The "Corresponding Source" for a work in object code form means all
147+the source code needed to generate, install, and (for an executable
148+work) run the object code and to modify the work, including scripts to
149+control those activities. However, it does not include the work's
150+System Libraries, or general-purpose tools or generally available free
151+programs which are used unmodified in performing those activities but
152+which are not part of the work. For example, Corresponding Source
153+includes interface definition files associated with source files for
154+the work, and the source code for shared libraries and dynamically
155+linked subprograms that the work is specifically designed to require,
156+such as by intimate data communication or control flow between those
157+subprograms and other parts of the work.
158+
159+ The Corresponding Source need not include anything that users
160+can regenerate automatically from other parts of the Corresponding
161+Source.
162+
163+ The Corresponding Source for a work in source code form is that
164+same work.
165+
166+ 2. Basic Permissions.
167+
168+ All rights granted under this License are granted for the term of
169+copyright on the Program, and are irrevocable provided the stated
170+conditions are met. This License explicitly affirms your unlimited
171+permission to run the unmodified Program. The output from running a
172+covered work is covered by this License only if the output, given its
173+content, constitutes a covered work. This License acknowledges your
174+rights of fair use or other equivalent, as provided by copyright law.
175+
176+ You may make, run and propagate covered works that you do not
177+convey, without conditions so long as your license otherwise remains
178+in force. You may convey covered works to others for the sole purpose
179+of having them make modifications exclusively for you, or provide you
180+with facilities for running those works, provided that you comply with
181+the terms of this License in conveying all material for which you do
182+not control copyright. Those thus making or running the covered works
183+for you must do so exclusively on your behalf, under your direction
184+and control, on terms that prohibit them from making any copies of
185+your copyrighted material outside their relationship with you.
186+
187+ Conveying under any other circumstances is permitted solely under
188+the conditions stated below. Sublicensing is not allowed; section 10
189+makes it unnecessary.
190+
191+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
192+
193+ No covered work shall be deemed part of an effective technological
194+measure under any applicable law fulfilling obligations under article
195+11 of the WIPO copyright treaty adopted on 20 December 1996, or
196+similar laws prohibiting or restricting circumvention of such
197+measures.
198+
199+ When you convey a covered work, you waive any legal power to forbid
200+circumvention of technological measures to the extent such circumvention
201+is effected by exercising rights under this License with respect to
202+the covered work, and you disclaim any intention to limit operation or
203+modification of the work as a means of enforcing, against the work's
204+users, your or third parties' legal rights to forbid circumvention of
205+technological measures.
206+
207+ 4. Conveying Verbatim Copies.
208+
209+ You may convey verbatim copies of the Program's source code as you
210+receive it, in any medium, provided that you conspicuously and
211+appropriately publish on each copy an appropriate copyright notice;
212+keep intact all notices stating that this License and any
213+non-permissive terms added in accord with section 7 apply to the code;
214+keep intact all notices of the absence of any warranty; and give all
215+recipients a copy of this License along with the Program.
216+
217+ You may charge any price or no price for each copy that you convey,
218+and you may offer support or warranty protection for a fee.
219+
220+ 5. Conveying Modified Source Versions.
221+
222+ You may convey a work based on the Program, or the modifications to
223+produce it from the Program, in the form of source code under the
224+terms of section 4, provided that you also meet all of these conditions:
225+
226+ a) The work must carry prominent notices stating that you modified
227+ it, and giving a relevant date.
228+
229+ b) The work must carry prominent notices stating that it is
230+ released under this License and any conditions added under section
231+ 7. This requirement modifies the requirement in section 4 to
232+ "keep intact all notices".
233+
234+ c) You must license the entire work, as a whole, under this
235+ License to anyone who comes into possession of a copy. This
236+ License will therefore apply, along with any applicable section 7
237+ additional terms, to the whole of the work, and all its parts,
238+ regardless of how they are packaged. This License gives no
239+ permission to license the work in any other way, but it does not
240+ invalidate such permission if you have separately received it.
241+
242+ d) If the work has interactive user interfaces, each must display
243+ Appropriate Legal Notices; however, if the Program has interactive
244+ interfaces that do not display Appropriate Legal Notices, your
245+ work need not make them do so.
246+
247+ A compilation of a covered work with other separate and independent
248+works, which are not by their nature extensions of the covered work,
249+and which are not combined with it such as to form a larger program,
250+in or on a volume of a storage or distribution medium, is called an
251+"aggregate" if the compilation and its resulting copyright are not
252+used to limit the access or legal rights of the compilation's users
253+beyond what the individual works permit. Inclusion of a covered work
254+in an aggregate does not cause this License to apply to the other
255+parts of the aggregate.
256+
257+ 6. Conveying Non-Source Forms.
258+
259+ You may convey a covered work in object code form under the terms
260+of sections 4 and 5, provided that you also convey the
261+machine-readable Corresponding Source under the terms of this License,
262+in one of these ways:
263+
264+ a) Convey the object code in, or embodied in, a physical product
265+ (including a physical distribution medium), accompanied by the
266+ Corresponding Source fixed on a durable physical medium
267+ customarily used for software interchange.
268+
269+ b) Convey the object code in, or embodied in, a physical product
270+ (including a physical distribution medium), accompanied by a
271+ written offer, valid for at least three years and valid for as
272+ long as you offer spare parts or customer support for that product
273+ model, to give anyone who possesses the object code either (1) a
274+ copy of the Corresponding Source for all the software in the
275+ product that is covered by this License, on a durable physical
276+ medium customarily used for software interchange, for a price no
277+ more than your reasonable cost of physically performing this
278+ conveying of source, or (2) access to copy the
279+ Corresponding Source from a network server at no charge.
280+
281+ c) Convey individual copies of the object code with a copy of the
282+ written offer to provide the Corresponding Source. This
283+ alternative is allowed only occasionally and noncommercially, and
284+ only if you received the object code with such an offer, in accord
285+ with subsection 6b.
286+
287+ d) Convey the object code by offering access from a designated
288+ place (gratis or for a charge), and offer equivalent access to the
289+ Corresponding Source in the same way through the same place at no
290+ further charge. You need not require recipients to copy the
291+ Corresponding Source along with the object code. If the place to
292+ copy the object code is a network server, the Corresponding Source
293+ may be on a different server (operated by you or a third party)
294+ that supports equivalent copying facilities, provided you maintain
295+ clear directions next to the object code saying where to find the
296+ Corresponding Source. Regardless of what server hosts the
297+ Corresponding Source, you remain obligated to ensure that it is
298+ available for as long as needed to satisfy these requirements.
299+
300+ e) Convey the object code using peer-to-peer transmission, provided
301+ you inform other peers where the object code and Corresponding
302+ Source of the work are being offered to the general public at no
303+ charge under subsection 6d.
304+
305+ A separable portion of the object code, whose source code is excluded
306+from the Corresponding Source as a System Library, need not be
307+included in conveying the object code work.
308+
309+ A "User Product" is either (1) a "consumer product", which means any
310+tangible personal property which is normally used for personal, family,
311+or household purposes, or (2) anything designed or sold for incorporation
312+into a dwelling. In determining whether a product is a consumer product,
313+doubtful cases shall be resolved in favor of coverage. For a particular
314+product received by a particular user, "normally used" refers to a
315+typical or common use of that class of product, regardless of the status
316+of the particular user or of the way in which the particular user
317+actually uses, or expects or is expected to use, the product. A product
318+is a consumer product regardless of whether the product has substantial
319+commercial, industrial or non-consumer uses, unless such uses represent
320+the only significant mode of use of the product.
321+
322+ "Installation Information" for a User Product means any methods,
323+procedures, authorization keys, or other information required to install
324+and execute modified versions of a covered work in that User Product from
325+a modified version of its Corresponding Source. The information must
326+suffice to ensure that the continued functioning of the modified object
327+code is in no case prevented or interfered with solely because
328+modification has been made.
329+
330+ If you convey an object code work under this section in, or with, or
331+specifically for use in, a User Product, and the conveying occurs as
332+part of a transaction in which the right of possession and use of the
333+User Product is transferred to the recipient in perpetuity or for a
334+fixed term (regardless of how the transaction is characterized), the
335+Corresponding Source conveyed under this section must be accompanied
336+by the Installation Information. But this requirement does not apply
337+if neither you nor any third party retains the ability to install
338+modified object code on the User Product (for example, the work has
339+been installed in ROM).
340+
341+ The requirement to provide Installation Information does not include a
342+requirement to continue to provide support service, warranty, or updates
343+for a work that has been modified or installed by the recipient, or for
344+the User Product in which it has been modified or installed. Access to a
345+network may be denied when the modification itself materially and
346+adversely affects the operation of the network or violates the rules and
347+protocols for communication across the network.
348+
349+ Corresponding Source conveyed, and Installation Information provided,
350+in accord with this section must be in a format that is publicly
351+documented (and with an implementation available to the public in
352+source code form), and must require no special password or key for
353+unpacking, reading or copying.
354+
355+ 7. Additional Terms.
356+
357+ "Additional permissions" are terms that supplement the terms of this
358+License by making exceptions from one or more of its conditions.
359+Additional permissions that are applicable to the entire Program shall
360+be treated as though they were included in this License, to the extent
361+that they are valid under applicable law. If additional permissions
362+apply only to part of the Program, that part may be used separately
363+under those permissions, but the entire Program remains governed by
364+this License without regard to the additional permissions.
365+
366+ When you convey a copy of a covered work, you may at your option
367+remove any additional permissions from that copy, or from any part of
368+it. (Additional permissions may be written to require their own
369+removal in certain cases when you modify the work.) You may place
370+additional permissions on material, added by you to a covered work,
371+for which you have or can give appropriate copyright permission.
372+
373+ Notwithstanding any other provision of this License, for material you
374+add to a covered work, you may (if authorized by the copyright holders of
375+that material) supplement the terms of this License with terms:
376+
377+ a) Disclaiming warranty or limiting liability differently from the
378+ terms of sections 15 and 16 of this License; or
379+
380+ b) Requiring preservation of specified reasonable legal notices or
381+ author attributions in that material or in the Appropriate Legal
382+ Notices displayed by works containing it; or
383+
384+ c) Prohibiting misrepresentation of the origin of that material, or
385+ requiring that modified versions of such material be marked in
386+ reasonable ways as different from the original version; or
387+
388+ d) Limiting the use for publicity purposes of names of licensors or
389+ authors of the material; or
390+
391+ e) Declining to grant rights under trademark law for use of some
392+ trade names, trademarks, or service marks; or
393+
394+ f) Requiring indemnification of licensors and authors of that
395+ material by anyone who conveys the material (or modified versions of
396+ it) with contractual assumptions of liability to the recipient, for
397+ any liability that these contractual assumptions directly impose on
398+ those licensors and authors.
399+
400+ All other non-permissive additional terms are considered "further
401+restrictions" within the meaning of section 10. If the Program as you
402+received it, or any part of it, contains a notice stating that it is
403+governed by this License along with a term that is a further
404+restriction, you may remove that term. If a license document contains
405+a further restriction but permits relicensing or conveying under this
406+License, you may add to a covered work material governed by the terms
407+of that license document, provided that the further restriction does
408+not survive such relicensing or conveying.
409+
410+ If you add terms to a covered work in accord with this section, you
411+must place, in the relevant source files, a statement of the
412+additional terms that apply to those files, or a notice indicating
413+where to find the applicable terms.
414+
415+ Additional terms, permissive or non-permissive, may be stated in the
416+form of a separately written license, or stated as exceptions;
417+the above requirements apply either way.
418+
419+ 8. Termination.
420+
421+ You may not propagate or modify a covered work except as expressly
422+provided under this License. Any attempt otherwise to propagate or
423+modify it is void, and will automatically terminate your rights under
424+this License (including any patent licenses granted under the third
425+paragraph of section 11).
426+
427+ However, if you cease all violation of this License, then your
428+license from a particular copyright holder is reinstated (a)
429+provisionally, unless and until the copyright holder explicitly and
430+finally terminates your license, and (b) permanently, if the copyright
431+holder fails to notify you of the violation by some reasonable means
432+prior to 60 days after the cessation.
433+
434+ Moreover, your license from a particular copyright holder is
435+reinstated permanently if the copyright holder notifies you of the
436+violation by some reasonable means, this is the first time you have
437+received notice of violation of this License (for any work) from that
438+copyright holder, and you cure the violation prior to 30 days after
439+your receipt of the notice.
440+
441+ Termination of your rights under this section does not terminate the
442+licenses of parties who have received copies or rights from you under
443+this License. If your rights have been terminated and not permanently
444+reinstated, you do not qualify to receive new licenses for the same
445+material under section 10.
446+
447+ 9. Acceptance Not Required for Having Copies.
448+
449+ You are not required to accept this License in order to receive or
450+run a copy of the Program. Ancillary propagation of a covered work
451+occurring solely as a consequence of using peer-to-peer transmission
452+to receive a copy likewise does not require acceptance. However,
453+nothing other than this License grants you permission to propagate or
454+modify any covered work. These actions infringe copyright if you do
455+not accept this License. Therefore, by modifying or propagating a
456+covered work, you indicate your acceptance of this License to do so.
457+
458+ 10. Automatic Licensing of Downstream Recipients.
459+
460+ Each time you convey a covered work, the recipient automatically
461+receives a license from the original licensors, to run, modify and
462+propagate that work, subject to this License. You are not responsible
463+for enforcing compliance by third parties with this License.
464+
465+ An "entity transaction" is a transaction transferring control of an
466+organization, or substantially all assets of one, or subdividing an
467+organization, or merging organizations. If propagation of a covered
468+work results from an entity transaction, each party to that
469+transaction who receives a copy of the work also receives whatever
470+licenses to the work the party's predecessor in interest had or could
471+give under the previous paragraph, plus a right to possession of the
472+Corresponding Source of the work from the predecessor in interest, if
473+the predecessor has it or can get it with reasonable efforts.
474+
475+ You may not impose any further restrictions on the exercise of the
476+rights granted or affirmed under this License. For example, you may
477+not impose a license fee, royalty, or other charge for exercise of
478+rights granted under this License, and you may not initiate litigation
479+(including a cross-claim or counterclaim in a lawsuit) alleging that
480+any patent claim is infringed by making, using, selling, offering for
481+sale, or importing the Program or any portion of it.
482+
483+ 11. Patents.
484+
485+ A "contributor" is a copyright holder who authorizes use under this
486+License of the Program or a work on which the Program is based. The
487+work thus licensed is called the contributor's "contributor version".
488+
489+ A contributor's "essential patent claims" are all patent claims
490+owned or controlled by the contributor, whether already acquired or
491+hereafter acquired, that would be infringed by some manner, permitted
492+by this License, of making, using, or selling its contributor version,
493+but do not include claims that would be infringed only as a
494+consequence of further modification of the contributor version. For
495+purposes of this definition, "control" includes the right to grant
496+patent sublicenses in a manner consistent with the requirements of
497+this License.
498+
499+ Each contributor grants you a non-exclusive, worldwide, royalty-free
500+patent license under the contributor's essential patent claims, to
501+make, use, sell, offer for sale, import and otherwise run, modify and
502+propagate the contents of its contributor version.
503+
504+ In the following three paragraphs, a "patent license" is any express
505+agreement or commitment, however denominated, not to enforce a patent
506+(such as an express permission to practice a patent or covenant not to
507+sue for patent infringement). To "grant" such a patent license to a
508+party means to make such an agreement or commitment not to enforce a
509+patent against the party.
510+
511+ If you convey a covered work, knowingly relying on a patent license,
512+and the Corresponding Source of the work is not available for anyone
513+to copy, free of charge and under the terms of this License, through a
514+publicly available network server or other readily accessible means,
515+then you must either (1) cause the Corresponding Source to be so
516+available, or (2) arrange to deprive yourself of the benefit of the
517+patent license for this particular work, or (3) arrange, in a manner
518+consistent with the requirements of this License, to extend the patent
519+license to downstream recipients. "Knowingly relying" means you have
520+actual knowledge that, but for the patent license, your conveying the
521+covered work in a country, or your recipient's use of the covered work
522+in a country, would infringe one or more identifiable patents in that
523+country that you have reason to believe are valid.
524+
525+ If, pursuant to or in connection with a single transaction or
526+arrangement, you convey, or propagate by procuring conveyance of, a
527+covered work, and grant a patent license to some of the parties
528+receiving the covered work authorizing them to use, propagate, modify
529+or convey a specific copy of the covered work, then the patent license
530+you grant is automatically extended to all recipients of the covered
531+work and works based on it.
532+
533+ A patent license is "discriminatory" if it does not include within
534+the scope of its coverage, prohibits the exercise of, or is
535+conditioned on the non-exercise of one or more of the rights that are
536+specifically granted under this License. You may not convey a covered
537+work if you are a party to an arrangement with a third party that is
538+in the business of distributing software, under which you make payment
539+to the third party based on the extent of your activity of conveying
540+the work, and under which the third party grants, to any of the
541+parties who would receive the covered work from you, a discriminatory
542+patent license (a) in connection with copies of the covered work
543+conveyed by you (or copies made from those copies), or (b) primarily
544+for and in connection with specific products or compilations that
545+contain the covered work, unless you entered into that arrangement,
546+or that patent license was granted, prior to 28 March 2007.
547+
548+ Nothing in this License shall be construed as excluding or limiting
549+any implied license or other defenses to infringement that may
550+otherwise be available to you under applicable patent law.
551+
552+ 12. No Surrender of Others' Freedom.
553+
554+ If conditions are imposed on you (whether by court order, agreement or
555+otherwise) that contradict the conditions of this License, they do not
556+excuse you from the conditions of this License. If you cannot convey a
557+covered work so as to satisfy simultaneously your obligations under this
558+License and any other pertinent obligations, then as a consequence you may
559+not convey it at all. For example, if you agree to terms that obligate you
560+to collect a royalty for further conveying from those to whom you convey
561+the Program, the only way you could satisfy both those terms and this
562+License would be to refrain entirely from conveying the Program.
563+
564+ 13. Use with the GNU Affero General Public License.
565+
566+ Notwithstanding any other provision of this License, you have
567+permission to link or combine any covered work with a work licensed
568+under version 3 of the GNU Affero General Public License into a single
569+combined work, and to convey the resulting work. The terms of this
570+License will continue to apply to the part which is the covered work,
571+but the special requirements of the GNU Affero General Public License,
572+section 13, concerning interaction through a network will apply to the
573+combination as such.
574+
575+ 14. Revised Versions of this License.
576+
577+ The Free Software Foundation may publish revised and/or new versions of
578+the GNU General Public License from time to time. Such new versions will
579+be similar in spirit to the present version, but may differ in detail to
580+address new problems or concerns.
581+
582+ Each version is given a distinguishing version number. If the
583+Program specifies that a certain numbered version of the GNU General
584+Public License "or any later version" applies to it, you have the
585+option of following the terms and conditions either of that numbered
586+version or of any later version published by the Free Software
587+Foundation. If the Program does not specify a version number of the
588+GNU General Public License, you may choose any version ever published
589+by the Free Software Foundation.
590+
591+ If the Program specifies that a proxy can decide which future
592+versions of the GNU General Public License can be used, that proxy's
593+public statement of acceptance of a version permanently authorizes you
594+to choose that version for the Program.
595+
596+ Later license versions may give you additional or different
597+permissions. However, no additional obligations are imposed on any
598+author or copyright holder as a result of your choosing to follow a
599+later version.
600+
601+ 15. Disclaimer of Warranty.
602+
603+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
604+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
605+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
606+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
607+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
608+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
609+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
610+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
611+
612+ 16. Limitation of Liability.
613+
614+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
615+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
616+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
617+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
618+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
619+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
620+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
621+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
622+SUCH DAMAGES.
623+
624+ 17. Interpretation of Sections 15 and 16.
625+
626+ If the disclaimer of warranty and limitation of liability provided
627+above cannot be given local legal effect according to their terms,
628+reviewing courts shall apply local law that most closely approximates
629+an absolute waiver of all civil liability in connection with the
630+Program, unless a warranty or assumption of liability accompanies a
631+copy of the Program in return for a fee.
632+
633+ END OF TERMS AND CONDITIONS
634+
635+ How to Apply These Terms to Your New Programs
636+
637+ If you develop a new program, and you want it to be of the greatest
638+possible use to the public, the best way to achieve this is to make it
639+free software which everyone can redistribute and change under these terms.
640+
641+ To do so, attach the following notices to the program. It is safest
642+to attach them to the start of each source file to most effectively
643+state the exclusion of warranty; and each file should have at least
644+the "copyright" line and a pointer to where the full notice is found.
645+
646+ <one line to give the program's name and a brief idea of what it does.>
647+ Copyright (C) <year> <name of author>
648+
649+ This program is free software: you can redistribute it and/or modify
650+ it under the terms of the GNU General Public License as published by
651+ the Free Software Foundation, either version 3 of the License, or
652+ (at your option) any later version.
653+
654+ This program is distributed in the hope that it will be useful,
655+ but WITHOUT ANY WARRANTY; without even the implied warranty of
656+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
657+ GNU General Public License for more details.
658+
659+ You should have received a copy of the GNU General Public License
660+ along with this program. If not, see <http://www.gnu.org/licenses/>.
661+
662+Also add information on how to contact you by electronic and paper mail.
663+
664+ If the program does terminal interaction, make it output a short
665+notice like this when it starts in an interactive mode:
666+
667+ <program> Copyright (C) <year> <name of author>
668+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
669+ This is free software, and you are welcome to redistribute it
670+ under certain conditions; type `show c' for details.
671+
672+The hypothetical commands `show w' and `show c' should show the appropriate
673+parts of the General Public License. Of course, your program's commands
674+might be different; for a GUI interface, you would use an "about box".
675+
676+ You should also get your employer (if you work as a programmer) or school,
677+if any, to sign a "copyright disclaimer" for the program, if necessary.
678+For more information on this, and how to apply and follow the GNU GPL, see
679+<http://www.gnu.org/licenses/>.
680+
681+ The GNU General Public License does not permit incorporating your program
682+into proprietary programs. If your program is a subroutine library, you
683+may consider it more useful to permit linking proprietary applications with
684+the library. If this is what you want to do, use the GNU Lesser General
685+Public License instead of this License. But first, please read
686+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
687
688=== added file 'README'
689--- README 1970-01-01 00:00:00 +0000
690+++ README 2014-08-19 22:56:22 +0000
691@@ -0,0 +1,12 @@
692+Directory structure for user experience test cases should be
693+
694+ ubuntu_experience_tests/
695+ |--tests
696+ |----<AppName>
697+ |------test_<app_name>.py
698+
699+Class name in test_<app_name>.py should be
700+
701+class <AppNameTestCase>:
702+
703+One py module file can contain multiple user experience test cases.
704
705=== added directory 'debian'
706=== renamed directory 'debian' => 'debian.moved'
707=== added file 'debian/changelog'
708--- debian/changelog 1970-01-01 00:00:00 +0000
709+++ debian/changelog 2014-08-19 22:56:22 +0000
710@@ -0,0 +1,48 @@
711+ubuntu-experience-tests (0.1+14.10.20140808-0ubuntu1) utopic; urgency=low
712+
713+ [ Nicholas Skaggs ]
714+ * (no message)
715+
716+ [ Omer Akram ]
717+ * first commit to include integration tests and debian structure
718+ * style changes: debial/control
719+ * make the module installation such a way so that we can create
720+ different deb packages our of this source
721+ * separate out helper functions into a seprate module to be consumed
722+ by others
723+ * make the testsuite architecture independant
724+ * update header files
725+ * depend on dialer-app
726+ * also depend on uitoolkit-autopilot
727+ * we are using emulators from unity8, depend on its autopilot package
728+ * add docstring to make it clear what the helper function does
729+ * added tests for the environment fixtures
730+
731+ [ Dan Chapman ]
732+ * Merge: Brendan Donegan 2014-06-19 Fix call to get_vcard_uid
733+
734+ [ Leo Arias ]
735+ * Added flake8 check to the debian package.
736+ * Update the environment to use the helpers from the toolkit.
737+ * Cleaned up the test to use the helpers from the dialer app.
738+ * Added readme file describing the directory structure and class name
739+ format when adding new tests.
740+ * Test that online accounts launched with url dispatcher can be swiped
741+ into background.
742+ * skiptest is a typo in test_osd_dialer_integration.py, should be
743+ skipTest
744+ * Ported package to python3. Removed dialer tests for now, because it
745+ is python2.
746+ * Fix a couple of minor issues that slipped in with the
747+ ContactsDbusService branch.
748+ * Fixed the packaging to install ubuntu_experience_tests as a py3
749+ library.
750+ * Updated the test to take into account the new dash app.
751+
752+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 08 Aug 2014 08:15:15 +0000
753+
754+ubuntu-experience-tests (0.1-0ubuntu1) utopic; urgency=medium
755+
756+ * Initial release. (Closes: #1353842)
757+
758+ -- Leonardo Arias Fonseca <leo.arias@canonical.com> Thu, 07 Aug 2014 00:36:42 -0600
759
760=== added file 'debian/compat'
761--- debian/compat 1970-01-01 00:00:00 +0000
762+++ debian/compat 2014-08-19 22:56:22 +0000
763@@ -0,0 +1,1 @@
764+9
765
766=== added file 'debian/control'
767--- debian/control 1970-01-01 00:00:00 +0000
768+++ debian/control 2014-08-19 22:56:22 +0000
769@@ -0,0 +1,27 @@
770+Source: ubuntu-experience-tests
771+Section: utils
772+Priority: optional
773+Maintainer: Ubuntu Quality Team <ubuntu-quality@lists.ubuntu.com>
774+Build-Depends: debhelper (>= 9.0.0),
775+ dh-python,
776+ pyflakes,
777+ python3-all,
778+ python3-pep8,
779+ python3-setuptools,
780+Standards-Version: 3.9.5
781+Homepage: https://launchpad.net/ubuntu-autopilot-tests/
782+Vcs-bzr: lp:ubuntu-autopilot-tests/ubuntu-experience-tests
783+X-Python3-Version: >= 3.2
784+
785+Package: ubuntu-experience-tests
786+Architecture: all
787+Depends: ${misc:Depends},
788+ ${python3:Depends},
789+ ${shlibs:Depends},
790+ python3-autopilot,
791+ ubuntu-ui-toolkit-autopilot,
792+ unity8-autopilot,
793+ url-dispatcher-tools,
794+Description: Ubuntu user experience Autopilot tests
795+ This package provides a set of autopilot tests for testing
796+ the inter-app integration under Unity8
797
798=== added file 'debian/copyright'
799--- debian/copyright 1970-01-01 00:00:00 +0000
800+++ debian/copyright 2014-08-19 22:56:22 +0000
801@@ -0,0 +1,28 @@
802+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
803+Upstream-Name: ubuntu-experience-tests
804+Source: https://code.launchpad.net/ubuntu-autopilot-tests/ubuntu-experience-tests
805+
806+Files: *
807+Copyright: 2013 Ubuntu Quality Team <ubuntu-quality@lists.ubuntu.com>
808+License: GPL-3.0+
809+
810+Files: debian/*
811+Copyright: 2013 Ubuntu Quality Team <ubuntu-quality@lists.ubuntu.com>
812+License: GPL-3.0+
813+
814+License: GPL-3.0+
815+ This program is free software: you can redistribute it and/or modify
816+ it under the terms of the GNU General Public License as published by
817+ the Free Software Foundation, either version 3 of the License, or
818+ (at your option) any later version.
819+ .
820+ This package is distributed in the hope that it will be useful,
821+ but WITHOUT ANY WARRANTY; without even the implied warranty of
822+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
823+ GNU General Public License for more details.
824+ .
825+ You should have received a copy of the GNU General Public License
826+ along with this program. If not, see <http://www.gnu.org/licenses/>.
827+ .
828+ On Debian systems, the complete text of the GNU General
829+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
830
831=== added file 'debian/rules'
832--- debian/rules 1970-01-01 00:00:00 +0000
833+++ debian/rules 2014-08-19 22:56:22 +0000
834@@ -0,0 +1,16 @@
835+#!/usr/bin/make -f
836+# -*- makefile -*-
837+
838+# Uncomment this to turn on verbose mode.
839+#export DH_VERBOSE=1
840+export PYBUILD_NAME=ubuntu_experience_tests
841+
842+%:
843+ dh $@ --with python3 --buildsystem pybuild
844+
845+override_dh_auto_test:
846+ python3 -m pep8 ubuntu_experience_tests/
847+ pyflakes3 ubuntu_experience_tests/
848+
849+override_dh_install:
850+ dh_install --fail-missing
851
852=== added directory 'debian/source'
853=== added file 'debian/source/format'
854--- debian/source/format 1970-01-01 00:00:00 +0000
855+++ debian/source/format 2014-08-19 22:56:22 +0000
856@@ -0,0 +1,1 @@
857+1.0
858
859=== added file 'setup.py'
860--- setup.py 1970-01-01 00:00:00 +0000
861+++ setup.py 2014-08-19 22:56:22 +0000
862@@ -0,0 +1,35 @@
863+#!/usr/bin/env python3
864+
865+# Copyright 2014 Canonical Ltd.
866+#
867+# This file is part of ubuntu-experience-tests.
868+#
869+# This program is free software; you can redistribute it and/or modify
870+# it under the terms of the GNU General Public License version 3, as published
871+# by the Free Software Foundation.
872+#
873+# This program is distributed in the hope that it will be useful,
874+# but WITHOUT ANY WARRANTY; without even the implied warranty of
875+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
876+# GNU General Public License for more details.
877+#
878+# You should have received a copy of the GNU General Public License
879+# along with this program. If not, see <http://www.gnu.org/licenses
880+
881+import setuptools
882+
883+
884+VERSION = '1.0'
885+
886+
887+setuptools.setup(
888+ name='ubuntu_experience_tests',
889+ version=VERSION,
890+ description='Ubuntu user experience Autopilot tests.',
891+ author='Ubuntu Engineering QA Team',
892+ author_email='qa-team@lists.canonical.com',
893+ url='https://launchpad.net/ubuntu-autopilot-tests/ubuntu-experience-tests',
894+ license='GPLv3',
895+ packages=setuptools.find_packages(),
896+ test_suite='ubuntu_experience_tests.tests',
897+)
898
899=== renamed file 'setup.py' => 'setup.py.moved'
900=== added directory 'ubuntu_experience_tests'
901=== added file 'ubuntu_experience_tests/__init__.py'
902--- ubuntu_experience_tests/__init__.py 1970-01-01 00:00:00 +0000
903+++ ubuntu_experience_tests/__init__.py 2014-08-19 22:56:22 +0000
904@@ -0,0 +1,17 @@
905+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
906+#
907+# Copyright 2014 Canonical Ltd.
908+#
909+# This file is part of ubuntu-experience-tests.
910+#
911+# This program is free software; you can redistribute it and/or modify
912+# it under the terms of the GNU General Public License version 3, as published
913+# by the Free Software Foundation.
914+#
915+# This program is distributed in the hope that it will be useful,
916+# but WITHOUT ANY WARRANTY; without even the implied warranty of
917+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
918+# GNU General Public License for more details.
919+#
920+# You should have received a copy of the GNU General Public License
921+# along with this program. If not, see <http://www.gnu.org/licenses/>
922
923=== added file 'ubuntu_experience_tests/fixture_setup.py'
924--- ubuntu_experience_tests/fixture_setup.py 1970-01-01 00:00:00 +0000
925+++ ubuntu_experience_tests/fixture_setup.py 2014-08-19 22:56:22 +0000
926@@ -0,0 +1,30 @@
927+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
928+#
929+# Copyright 2014 Canonical Ltd.
930+# Author: Omer Akram <omer.akram@canonical.com>
931+#
932+# This file is part of ubuntu-experience-tests.
933+#
934+# This program is free software; you can redistribute it and/or modify
935+# it under the terms of the GNU General Public License version 3, as published
936+# by the Free Software Foundation.
937+#
938+# This program is distributed in the hope that it will be useful,
939+# but WITHOUT ANY WARRANTY; without even the implied warranty of
940+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
941+# GNU General Public License for more details.
942+#
943+# You should have received a copy of the GNU General Public License
944+# along with this program. If not, see <http://www.gnu.org/licenses/>
945+
946+"""Set up and clean up fixtures for the Inter-app integration tests."""
947+
948+
949+from ubuntuuitoolkit import fixture_setup as toolkit_fixtures
950+
951+
952+class TestabilityEnvironment(toolkit_fixtures.InitctlEnvironmentVariable):
953+ """Setup the testabilty environment."""
954+
955+ def __init__(self):
956+ super(TestabilityEnvironment, self).__init__(QT_LOAD_TESTABILITY=1)
957
958=== added file 'ubuntu_experience_tests/helpers.py'
959--- ubuntu_experience_tests/helpers.py 1970-01-01 00:00:00 +0000
960+++ ubuntu_experience_tests/helpers.py 2014-08-19 22:56:22 +0000
961@@ -0,0 +1,135 @@
962+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
963+#
964+# Copyright 2014 Canonical Ltd.
965+# Author: Omer Akram <omer.akram@canonical.com>
966+# Brendan Donegan <brendan.donegan@canonical.com>
967+#
968+# This file is part of ubuntu-experience-tests.
969+#
970+# This program is free software; you can redistribute it and/or modify
971+# it under the terms of the GNU General Public License version 3, as published
972+# by the Free Software Foundation.
973+#
974+# This program is distributed in the hope that it will be useful,
975+# but WITHOUT ANY WARRANTY; without even the implied warranty of
976+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
977+# GNU General Public License for more details.
978+#
979+# You should have received a copy of the GNU General Public License
980+# along with this program. If not, see <http://www.gnu.org/licenses/>
981+
982+"""Helper functions to make writing Inter-app integration tests easier."""
983+
984+import dbus
985+import re
986+import subprocess
987+import time
988+
989+from autopilot.introspection import get_proxy_object_for_existing_process
990+from ubuntuuitoolkit import emulators as toolkit_emulators
991+from unity8.shell.emulators import UnityEmulatorBase
992+
993+DBUS_IFACE_ADD_BOOK = 'com.canonical.pim.AddressBook'
994+DBUS_IFACE_ADD_BOOKVIEW = 'com.canonical.pim.AddressBookView'
995+
996+
997+class ContactsDbusService(object):
998+ def __init__(self):
999+ self.bus = None
1000+ self.addr = None
1001+ self.addr_iface = None
1002+ self.bus = dbus.SessionBus()
1003+ self.addr = self.bus.get_object(
1004+ 'com.canonical.pim', '/com/canonical/pim/AddressBook')
1005+ self.addr_iface = dbus.Interface(
1006+ self.addr, dbus_interface=DBUS_IFACE_ADD_BOOK)
1007+
1008+ def query_contacts(self, fields='', query='', sources=[]):
1009+ view_path = self.addr_iface.query(fields, query, [])
1010+ view = self.bus.get_object(
1011+ 'com.canonical.pim', view_path)
1012+ view_iface = dbus.Interface(
1013+ view, dbus_interface=DBUS_IFACE_ADD_BOOKVIEW)
1014+ contacts = view_iface.contactsDetails([], 0, -1)
1015+ view.close()
1016+ return contacts
1017+
1018+ def update_contact(self, vcard):
1019+ return self.addr_iface.updateContacts([vcard])
1020+
1021+ def create_contact(self, vcard):
1022+ return self.addr_iface.createContact(vcard, "")
1023+
1024+ def delete_contact(self, ids):
1025+ return self.addr_iface.removeContacts(ids)
1026+
1027+ def get_vcard_uid(self, vcard):
1028+ """
1029+ Return the UID of the provided vcard
1030+ :param vcard: vcard formatted data
1031+ :return: uid value from vcard, else None
1032+ """
1033+ uid_pattern = re.compile(r'''
1034+ ^ # start of string
1035+ .* # any characters
1036+ UID:(.*?) # UID value, saved to group, non-greedy
1037+ \r\n # new line
1038+ .* # anything else
1039+ $ # end of string
1040+ ''', re.VERBOSE | re.IGNORECASE | re.DOTALL)
1041+ uid = None
1042+ match = uid_pattern.match(vcard)
1043+ if match:
1044+ uid = match.group(1)
1045+ return uid
1046+
1047+ def delete_all_contacts(self):
1048+ """
1049+ Delete all contacts using the dbus service
1050+ """
1051+ uids = []
1052+ contacts = self.query_contacts()
1053+ for contact in contacts:
1054+ uid = self.get_vcard_uid(contact)
1055+ if uid:
1056+ uids.append(uid)
1057+ self.delete_contact(uids)
1058+
1059+
1060+def get_proxy_object_by_process_name(proc_name):
1061+ """Helper function to return proxy object of a process
1062+
1063+ :param proc_name: Name of the running application process with testability
1064+ driver loaded.
1065+ :returns: Proxy object for the given process using emulator base from
1066+ ubuntuuittoolkit and in case proc_name is unity8 use UnityEmulatorBase.
1067+ :raises: RuntimeError if process is not found to be running after
1068+ 10 seconds.
1069+
1070+ """
1071+ return get_proxy_object_for_existing_process(
1072+ _get_pid_by_name(proc_name),
1073+ emulator_base=_get_emulator_base(proc_name)
1074+ )
1075+
1076+
1077+def _get_pid_by_name(proc_name):
1078+ for i in range(10):
1079+ try:
1080+ return int(
1081+ subprocess.check_output(['pidof', proc_name]).strip())
1082+ except subprocess.CalledProcessError:
1083+ # application not started yet, check in a second
1084+ time.sleep(1)
1085+ else:
1086+ raise RuntimeError(
1087+ 'Could not find autopilot interface for {} after 10'
1088+ 'seconds'.format(proc_name)
1089+ )
1090+
1091+
1092+def _get_emulator_base(proc_name):
1093+ if proc_name == 'unity8':
1094+ return UnityEmulatorBase
1095+ else:
1096+ return toolkit_emulators.UbuntuUIToolkitEmulatorBase
1097
1098=== added directory 'ubuntu_experience_tests/tests'
1099=== added file 'ubuntu_experience_tests/tests/__init__.py'
1100--- ubuntu_experience_tests/tests/__init__.py 1970-01-01 00:00:00 +0000
1101+++ ubuntu_experience_tests/tests/__init__.py 2014-08-19 22:56:22 +0000
1102@@ -0,0 +1,36 @@
1103+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1104+#
1105+# Copyright 2014 Canonical Ltd.
1106+# Author: Omer Akram <omer.akram@canonical.com>
1107+#
1108+# This file is part of ubuntu-experience-tests.
1109+#
1110+# This program is free software; you can redistribute it and/or modify
1111+# it under the terms of the GNU General Public License version 3, as published
1112+# by the Free Software Foundation.
1113+#
1114+# This program is distributed in the hope that it will be useful,
1115+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1116+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1117+# GNU General Public License for more details.
1118+#
1119+# You should have received a copy of the GNU General Public License
1120+# along with this program. If not, see <http://www.gnu.org/licenses/>
1121+
1122+from autopilot.input import Touch, Pointer
1123+from unity8.shell import tests as unity_tests
1124+from unity8.shell.emulators import main_window
1125+
1126+from unity8 import process_helpers
1127+
1128+
1129+class UbuntuExperienceTestCase(unity_tests.UnityTestCase):
1130+
1131+ def setUp(self):
1132+ super(UbuntuExperienceTestCase, self).setUp()
1133+ self.pointing_device = Pointer(Touch.create())
1134+ self._qml_mock_enabled = False
1135+ self._data_dirs_mock_enabled = False
1136+ self.unity_proxy = self.launch_unity()
1137+ process_helpers.unlock_unity(self.unity_proxy)
1138+ self.unity = self.unity_proxy.select_single(main_window.QQuickView)
1139
1140=== added directory 'ubuntu_experience_tests/tests/application_life_cycle'
1141=== added file 'ubuntu_experience_tests/tests/application_life_cycle/__init__.py'
1142=== added file 'ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py'
1143--- ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py 1970-01-01 00:00:00 +0000
1144+++ ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py 2014-08-19 22:56:22 +0000
1145@@ -0,0 +1,58 @@
1146+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1147+#
1148+# Copyright (C) 2014 Canonical Ltd.
1149+#
1150+# This file is part of ubuntu-integration-tests.
1151+#
1152+# ubuntu-integration-tests is free software; you can redistribute it and/or
1153+# modify it under the terms of the GNU General Public License as published by
1154+# the Free Software Foundation; version 3.
1155+#
1156+# This program is distributed in the hope that it will be useful,
1157+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1158+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1159+# GNU Lesser General Public License for more details.
1160+#
1161+# You should have received a copy of the GNU General Public License
1162+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1163+
1164+import os
1165+import subprocess
1166+
1167+from autopilot import platform
1168+from autopilot.matchers import Eventually
1169+from testtools.matchers import Equals
1170+
1171+from ubuntu_experience_tests import tests
1172+
1173+
1174+class URLDispatcherTestCase(tests.UbuntuExperienceTestCase):
1175+
1176+ def setUp(self):
1177+ super(URLDispatcherTestCase, self).setUp()
1178+ if platform.model() == 'Desktop':
1179+ self.skipTest('URL dispatcher does not work on the desktop.')
1180+
1181+ def test_swipe_out_online_accounts_launched_with_url_dispatcher(self):
1182+ """Test online accounts launched with URL Dispatcher.
1183+
1184+ Check that the application can be swiped out showing the dashboard and
1185+ no focused application.
1186+
1187+ """
1188+ self.assertEqual(
1189+ 'unity8-dash', self.unity.get_current_focused_app_id())
1190+ self.addCleanup(os.system, 'pkill system-settings')
1191+ self.addCleanup(os.system, 'pkill online-accounts')
1192+
1193+ subprocess.check_call(
1194+ ['url-dispatcher', 'settings:///system/online-accounts'])
1195+
1196+ self.assertThat(
1197+ self.unity.get_current_focused_app_id,
1198+ Eventually(Equals('ubuntu-system-settings')))
1199+
1200+ self.unity.show_dash_swiping()
1201+ self.assertThat(
1202+ self.unity.get_current_focused_app_id,
1203+ Eventually(Equals('unity8-dash')))
1204
1205=== added file 'ubuntu_experience_tests/tests/test_fixture_setup.py'
1206--- ubuntu_experience_tests/tests/test_fixture_setup.py 1970-01-01 00:00:00 +0000
1207+++ ubuntu_experience_tests/tests/test_fixture_setup.py 2014-08-19 22:56:22 +0000
1208@@ -0,0 +1,56 @@
1209+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1210+#
1211+# Copyright 2014 Canonical Ltd.
1212+# Author: Omer Akram <omer.akram@canonical.com>
1213+#
1214+# This file is part of ubuntu-experience-tests.
1215+#
1216+# This program is free software; you can redistribute it and/or modify
1217+# it under the terms of the GNU General Public License version 3, as published
1218+# by the Free Software Foundation.
1219+#
1220+# This program is distributed in the hope that it will be useful,
1221+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1222+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1223+# GNU General Public License for more details.
1224+#
1225+# You should have received a copy of the GNU General Public License
1226+# along with this program. If not, see <http://www.gnu.org/licenses/>
1227+
1228+import testtools
1229+
1230+from ubuntuuitoolkit import environment
1231+
1232+from ubuntu_experience_tests import fixture_setup
1233+
1234+
1235+class TestabilityEnvironmentTestCase(testtools.TestCase):
1236+
1237+ def get_testability_environment_variable(self):
1238+ try:
1239+ return environment.get_initctl_env_var('QT_LOAD_TESTABILITY')
1240+ except:
1241+ return None
1242+
1243+ def test_fixture_must_setup_testability_environment(self):
1244+ """Test the testability environment fixture is setting the variable."""
1245+ fixture = fixture_setup.TestabilityEnvironment()
1246+ self.useFixture(fixture)
1247+
1248+ self.assertEquals('1', self.get_testability_environment_variable())
1249+
1250+ def test_fixture_must_cleanup_testability_environment(self):
1251+ """Test the testability fixture cleans the variable."""
1252+ original_value = self.get_testability_environment_variable()
1253+ fixture = fixture_setup.TestabilityEnvironment()
1254+
1255+ def inner_test():
1256+ class TestWithFakeApplication(testtools.TestCase):
1257+ def test_it(self):
1258+ self.useFixture(fixture)
1259+ return TestWithFakeApplication('test_it')
1260+
1261+ inner_test().run()
1262+
1263+ self.assertEqual(
1264+ original_value, self.get_testability_environment_variable())

Subscribers

People subscribed via source and target branches