Commit Graph

16 Commits

Author SHA1 Message Date
Sam Parkinson
aea65408f0 Specify library version prior to import, fixes #4900
Gi has been emitting warnings into the log to do this for some
time now. Not doing this has also caused bugs, such as #4900.
2015-10-31 14:44:46 +11:00
Gonzalo Odiard
952b8275a1 Add a testing method to open a activity with a uri
This can be used in the test to check if the activity can manage
different file formats.
2014-11-11 12:03:02 -03:00
Daniel Narvaez
71b42a2da0 Fix chaining up to the parent 2014-01-03 17:38:46 +00:00
Daniel Narvaez
acff63467d Fix pyflakes errors 2014-01-03 14:55:03 +00:00
Sai Vineet
29738c9087 Add Activity Testing API and check command to setup.py
./setup.py check now invokes tests in tests/ directory. tests directory should
have integration(UI tests) and unit(unit tests) sub directories, but it isn't
necessary to have any dir. of the above.
2014-01-03 14:33:58 +00:00
akskumarnot
81b388c554 Use proper formatting syntax, fixes #2170 2013-12-26 15:57:33 +01:00
Daniel Narvaez
9778f1d35f Don't set AT_SPI_CLIENT
This is not necessary anymore with latest at-spi2-atk
(See commit 683739dea15d7c02c217a404d8c5d9d7af076a57)
2013-06-26 23:00:58 +02:00
Daniel Narvaez
f54229efd2 Move setting AT_SPI_CLIENT to discover
It needs to be called as early as possible before unit tests
has a chance to import gtk.

Hopefully will fix random test failures we are seeing in buildbot.
2013-06-22 12:29:00 +02:00
Daniel Narvaez
6d319619f0 Factor out the discover logic to the test module
This avoids duplication in sugar and sugar-toolkit-gtk3
makefiles.
2013-06-22 12:28:56 +02:00
Daniel Narvaez
19bc2268d4 Log the UI tree on error
The dump method doesn't actually print anything, just
returns the tree as a string.
2013-06-19 19:20:44 +02:00
Daniel Narvaez
5bef5a82d2 Set the AT_SPI_CLIENT variable in the tests
This ensures the test itself is not recognized as a client
by the registry. I'm not sure how that happens since we are
not loading gtk, but it does. Not being a real gtk client with
a mainloop we wasn't answering dbus calls and causing the registry
to hang and fail.
2013-06-15 23:56:45 +02:00
Daniel Narvaez
4dc7b9e4a4 Don't set atspi timeout
Looking at the code I'm unconvinced this behaves as expected,
in certain cases at least. So reverting it for now to avoid
confusion.
2013-06-15 19:16:59 +02:00
Daniel Narvaez
521778636e Add a UIUnitTest class
To make it easier to write UI unit tests.
2013-06-15 19:15:32 +02:00
Daniel Narvaez
c86c582e19 Resync with the sugar-build implementation of tree.py
Development continued there for a while. Now I will remove it
and used the toolkit implementation instead.

Changes:

* Retry faster
* Handle GLib errors
* Don't always dump the tree
* Support master atspi api
2013-06-14 23:27:13 +02:00
William Orr
1252d95671 pep8'd sugar3.test 2013-06-11 15:25:07 +02:00
Daniel Narvaez
e6397cf2db Some initial infrastructure for UI tests
The uitree module exposes the at-spi tree. We can use it to do
functional tests of the UI, by checking if the expected
widgets exists, clicking them etc.

A simple example of how this can be used is in the test, which
runs a window and check that it has the expected button.
2013-04-09 11:36:51 +02:00