17 Commits (master)

Author SHA1 Message Date
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
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.
9 years ago
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.
10 years ago
Daniel Narvaez 71b42a2da0 Fix chaining up to the parent 10 years ago
Daniel Narvaez acff63467d Fix pyflakes errors 10 years ago
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.
10 years ago
akskumarnot 81b388c554 Use proper formatting syntax, fixes #2170 11 years ago
Daniel Narvaez 9778f1d35f Don't set AT_SPI_CLIENT
This is not necessary anymore with latest at-spi2-atk
(See commit 683739dea15d7c02c217a404d8c5d9d7af076a57)
11 years ago
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.
11 years ago
Daniel Narvaez 6d319619f0 Factor out the discover logic to the test module
This avoids duplication in sugar and sugar-toolkit-gtk3
makefiles.
11 years ago
Daniel Narvaez 19bc2268d4 Log the UI tree on error
The dump method doesn't actually print anything, just
returns the tree as a string.
11 years ago
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.
11 years ago
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.
11 years ago
Daniel Narvaez 521778636e Add a UIUnitTest class
To make it easier to write UI unit tests.
11 years ago
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
11 years ago
William Orr 1252d95671 pep8'd sugar3.test 11 years ago
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.
11 years ago