Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2006-10-23 22:12:25 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-10-23 22:12:25 (GMT)
commit9f3b6e0650f3c99994a529625695e594a8c8043c (patch)
tree8a8fdb4c8481eb382d428d6f585d1ed496bf03a9 /test
parent64bad20abb08a3de85241b5873a0ada9a43ba4b2 (diff)
Add automated UI tests for evince with dogtail. See bug #300948.
2006-10-24 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * configure.ac: * data/evince-password.glade: * test/Makefile.am: * test/test-encrypt.pdf: * test/test-links.pdf: * test/test1.py: * test/test2.py: Add automated UI tests for evince with dogtail. See bug #300948.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am4
-rw-r--r--test/test-encrypt.pdfbin0 -> 26501 bytes
-rw-r--r--test/test-links.pdfbin0 -> 15151 bytes
-rwxr-xr-xtest/test1.py27
-rwxr-xr-xtest/test2.py22
5 files changed, 53 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..dc0b1a3
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,4 @@
+
+TESTS = test1.py test2.py
+
+EXTRA_DIST = test-encrypted.pdf test-links.pdf \ No newline at end of file
diff --git a/test/test-encrypt.pdf b/test/test-encrypt.pdf
new file mode 100644
index 0000000..8f8f5c1
--- /dev/null
+++ b/test/test-encrypt.pdf
Binary files differ
diff --git a/test/test-links.pdf b/test/test-links.pdf
new file mode 100644
index 0000000..0b1e620
--- /dev/null
+++ b/test/test-links.pdf
Binary files differ
diff --git a/test/test1.py b/test/test1.py
new file mode 100755
index 0000000..8c05ebd
--- /dev/null
+++ b/test/test1.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+from dogtail.procedural import *
+from dogtail.utils import screenshot
+
+import os
+
+os.environ['LANG']='en_US.UTF-8'
+os.system ('rm -rf ~/.gnome2/evince')
+
+run('evince')
+
+focus.application('evince')
+
+click('File', roleName='menu')
+click('Open...', roleName='menu item')
+focus.dialog('Open Document')
+click('Cancel', roleName='push button')
+click('File', roleName='menu')
+click('Toolbar', roleName='menu item')
+focus.dialog('Toolbar Editor')
+click('Close', roleName='push button')
+click('About', roleName='menu item')
+focus.dialog('About Evince')
+click('Close', roleName='push button')
+click('Close', roleName='menu item')
+
diff --git a/test/test2.py b/test/test2.py
new file mode 100755
index 0000000..7e52c57
--- /dev/null
+++ b/test/test2.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+from dogtail.procedural import *
+from dogtail.utils import screenshot
+
+import os
+
+os.environ['LANG']='en_US.UTF-8'
+os.system ('rm -rf ~/.gnome2/evince')
+
+run('evince',arguments=' ./test-encrypt.pdf',)
+focus.dialog('Enter password')
+focus.widget('Password Entry', roleName='password text')
+type("wrong password")
+click('OK', roleName='push button')
+click('Cancel', roleName='push button')
+click('Unlock Document', roleName='push button')
+focus.widget('Password Entry', roleName='password text')
+type("Foo")
+click('OK', roleName='push button')
+click('Close', roleName='menu item')
+