]> www.fi.muni.cz Git - evince.git/commitdiff
Add automated UI tests for evince with dogtail. See bug #300948.
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Mon, 23 Oct 2006 22:12:25 +0000 (22:12 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Mon, 23 Oct 2006 22:12:25 +0000 (22:12 +0000)
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.

ChangeLog
configure.ac
data/evince-password.glade
test/Makefile.am [new file with mode: 0644]
test/test-encrypt.pdf [new file with mode: 0644]
test/test-links.pdf [new file with mode: 0644]
test/test1.py [new file with mode: 0755]
test/test2.py [new file with mode: 0755]

index 09622b6c82bf7d2afb5898650238cdb55db476af..9044eea96ef98787da7c695a30d189739c94f96b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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.    
+
 2006-10-22  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (fullscreen_timeout_cb), (ev_window_init):
index a33b02b2ae5b8fc37a2546f5df13eb970c1a4bec..9ab4bbfde51fe2d419536e3a180c54fb5dd12fdb 100644 (file)
@@ -367,35 +367,35 @@ fi
 AC_SUBST(EVINCE_MIME_TYPES)
 
 AC_CONFIG_FILES([
-Makefile
+backend/Makefile
+comics/Makefile
 cut-n-paste/Makefile
 cut-n-paste/recent-files/Makefile
-cut-n-paste/zoom-control/Makefile
 cut-n-paste/toolbar-editor/Makefile
-data/Makefile
+cut-n-paste/zoom-control/Makefile
 data/evince.desktop.in
-data/icons/Makefile
 data/icons/16x16/Makefile
 data/icons/22x22/Makefile
 data/icons/48x48/Makefile
+data/icons/Makefile
 data/icons/scalable/Makefile
-
-lib/Makefile
-pdf/Makefile
-pixbuf/Makefile
-tiff/Makefile
-ps/Makefile
+data/Makefile
 djvu/Makefile
 dvi/Makefile
 dvi/mdvi-lib/Makefile
+help/Makefile
 impress/Makefile
-comics/Makefile
+lib/Makefile
+Makefile
+pdf/Makefile
+pixbuf/Makefile
 po/Makefile.in
-backend/Makefile
 properties/Makefile
+ps/Makefile
 shell/Makefile
+test/Makefile
 thumbnailer/Makefile
-help/Makefile
+tiff/Makefile
 ])
 
 AC_OUTPUT
index 3d09a3c65556a1841f197674d5a04a34118a0697..7eab0715f53391c19c142cad30e7c63c7bd12568 100644 (file)
                      <property name="text" translatable="yes"></property>
                      <property name="has_frame">True</property>
                      <property name="activates_default">True</property>
+                     <accessibility>
+                       <atkproperty name="AtkObject::accessible_name" translatable="yes">Password Entry</atkproperty>
+                     </accessibility>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644 (file)
index 0000000..dc0b1a3
--- /dev/null
@@ -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 (file)
index 0000000..8f8f5c1
Binary files /dev/null and b/test/test-encrypt.pdf differ
diff --git a/test/test-links.pdf b/test/test-links.pdf
new file mode 100644 (file)
index 0000000..0b1e620
Binary files /dev/null and b/test/test-links.pdf differ
diff --git a/test/test1.py b/test/test1.py
new file mode 100755 (executable)
index 0000000..8c05ebd
--- /dev/null
@@ -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 (executable)
index 0000000..7e52c57
--- /dev/null
@@ -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')
+