Carla Sella has proposed merging lp:~carla-sella/ubuntu-docviewer-app/test-toc
into lp:ubuntu-docviewer-app.
Commit message:
First test for testing Docviewer app TOC.
Requested reviews:
Stefano Verzegnassi (verzegnassi-stefano)
Related bugs:
Bug #1418652 in Ubuntu Document Viewer App: Autopilot Testcase Needed: Test
PDF table of contents
https://bugs.launchpad.net/ubuntu-docviewer-app/+bug/1418652
For more details, see:
https://code.launchpad.net/~carla-sella/ubuntu-docviewer-app/test-toc/+merge/258082
First test for testing Docviewer app TOC.
--
Your team Ubuntu Document Viewer Developers is subscribed to branch
lp:ubuntu-docviewer-app.
=== modified file 'po/com.ubuntu.docviewer.pot'
--- po/com.ubuntu.docviewer.pot 2015-04-27 16:02:40 +
+++ po/com.ubuntu.docviewer.pot 2015-05-01 21:01:09 +
@@ -8,7 +8,7 @@
msgstr
Project-Id-Version: \n
Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-04-27 18:02+0200\n
+POT-Creation-Date: 2015-05-01 16:54+0200\n
PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
Last-Translator: FULL NAME EMAIL@ADDRESS\n
Language-Team: LANGUAGE l...@li.org\n
@@ -34,7 +34,7 @@
#: ../src/app/docviewer-application.cpp:164
#: ../src/app/qml/documentPage/DocumentPage.qml:25
-#: /home/stefano/tmp/build-ch-imported-documents-name-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:1
+#: /home/letozaf/autopilot-tests/build-ubuntu-docviewer-app-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:1
msgid Document Viewer
msgstr
@@ -257,12 +257,12 @@
msgstr
#. TRANSLATORS: Contents refers to the Table of Contents of a PDF document.
-#: ../src/app/qml/pdfView/PdfContentsPage.qml:26
+#: ../src/app/qml/pdfView/PdfContentsPage.qml:31
#: ../src/app/qml/pdfView/PdfView.qml:37
msgid Contents
msgstr
-#: ../src/app/qml/pdfView/PdfContentsPage.qml:32
+#: ../src/app/qml/pdfView/PdfContentsPage.qml:37
msgid Hide table of contents
msgstr
@@ -319,6 +319,6 @@
msgid Open
msgstr
-#: /home/stefano/tmp/build-ch-imported-documents-name-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:2
+#: /home/letozaf/autopilot-tests/build-ubuntu-docviewer-app-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:2
msgid documents;viewer;pdf;reader;
msgstr
=== modified file 'src/app/qml/pdfView/PdfContentsPage.qml'
--- src/app/qml/pdfView/PdfContentsPage.qml 2015-04-16 12:58:29 +
+++ src/app/qml/pdfView/PdfContentsPage.qml 2015-05-01 21:01:09 +
@@ -22,6 +22,11 @@
import ../upstreamComponents
Page {
+id: pdfContents
+objectName: pdfcontents
+
+property string testProperty: for page name issue
+
// TRANSLATORS: Contents refers to the Table of Contents of a PDF document.
title: i18n.tr(Contents)
@@ -57,6 +62,7 @@
ListView {
id: view
+objectName: view
anchors.fill: parent
clip: true
@@ -64,6 +70,7 @@
delegate: ListItemWithActions {
id: delegate
+objectName: delegate + index
width: parent.width
height: (model.level === 0) ? units.gu(7) : units.gu(6)
@@ -73,6 +80,7 @@
: Theme.palette.normal.background
AbstractButton {
+objectName: abstractbutton
anchors.fill: parent
onClicked: {
@@ -91,6 +99,7 @@
spacing: units.gu(1)
Label {
+objectName: content
Layout.fillWidth: true
text: model.title
@@ -102,6 +111,7 @@
}
Label {
+objectName: pageindex
text: model.pageIndex + 1
font.weight: model.level == 0 ? Font.DemiBold : Font.Normal
color: (model.level === 0) ? UbuntuColors.midAubergine
=== modified file 'tests/autopilot/ubuntu_docviewer_app/__init__.py'
--- tests/autopilot/ubuntu_docviewer_app/__init__.py 2015-04-14 15:37:06 +
+++ tests/autopilot/ubuntu_docviewer_app/__init__.py 2015-05-01 21:01:09 +
@@ -20,6 +20,7 @@
from autopilot import logging as autopilot_logging
logger = logging.getLogger(__name__)
+from autopilot.introspection import dbus
import ubuntuuitoolkit
@@ -58,6 +59,15 @@
return self.wait_select_single(PdfView)
@autopilot_logging.log_action(logger.info)
+def open_PdfContentsPage(self):
+Open the PdfContents Page.
+
+:return the PdfContents Page
+
+
+return self.wait_select_single(PdfContentsPage)
+
+@autopilot_logging.log_action(logger.info)
def get_PdfViewGotoDialog(self):
Return a dialog emulator
return self.wait_select_single(objectName=PdfViewGotoDialog)
@@ -82,7 +92,34 @@
self.main_view = self.get_root_instance().select_single(MainView)
-class PdfView(Page):
+class PageWithBottomEdge(MainView):
+
+An emulator class that makes it easy to interact with the bottom edge
+