summaryrefslogtreecommitdiff
path: root/test/testEncryptedFile.py
diff options
context:
space:
mode:
authorOz Tiram <[email protected]>2025-03-30 15:20:05 +0200
committerLuke from DC <[email protected]>2025-04-04 22:19:13 +0000
commitb1f21edcec82c25cbd6b59b521a841f86fb1f327 (patch)
tree57bed53a768722d58d0d4c081be54198f90d6cb6 /test/testEncryptedFile.py
parent0672f82ffb2e56ffb711703b3b786714d2bc794c (diff)
downloadatril-b1f21edcec82c25cbd6b59b521a841f86fb1f327.tar.bz2
atril-b1f21edcec82c25cbd6b59b521a841f86fb1f327.tar.xz
Initial support for meson
Mostly copy and paste from linuxmint/xreader Signed-off-by: Oz Tiram <[email protected]>
Diffstat (limited to 'test/testEncryptedFile.py')
-rwxr-xr-xtest/testEncryptedFile.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/testEncryptedFile.py b/test/testEncryptedFile.py
new file mode 100755
index 00000000..9b2741e5
--- /dev/null
+++ b/test/testEncryptedFile.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python3
+
+# Test opening a password encrypted file and unlocking it.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+
+ run_app(file='test-encrypt.pdf')
+
+ # Try an incorrect password first
+ focus.dialog('Enter password')
+ type('wrong password')
+ click('Unlock Document', roleName='push button')
+ focus.dialog('Enter password')
+ click('Cancel', roleName='push button')
+
+ # Try again with the correct password
+ focus.frame('test-encrypt.pdf — Password Required')
+ click('Unlock Document', roleName='push button')
+ type('Foo')
+ focus.dialog('Enter password')
+ click('Unlock Document', roleName='push button')
+
+ # Close xreader
+ focus.frame('test-encrypt.pdf — Dokument1')
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()