Bug 1260656 - Fix firefox-puppeteer documentation generation for Readthedocs. r?maja_zf draft
authorHenrik Skupin <mail@hskupin.info>
Wed, 30 Mar 2016 14:17:10 +0200
changeset 345798 56599dc9e0405446f410afd80c956d4c3d74db28
parent 345489 c0fa17b1195d11c2f94fc04c48bbbebb1667c80d
child 517270 b717cdf6fabf44e47b5aa456cc56757ac06dd07b
push id14176
push userbmo:hskupin@gmail.com
push dateWed, 30 Mar 2016 12:17:29 +0000
reviewersmaja_zf
bugs1260656
milestone48.0a1
Bug 1260656 - Fix firefox-puppeteer documentation generation for Readthedocs. r?maja_zf MozReview-Commit-ID: 4r7arjvMyWN
testing/puppeteer/firefox/firefox_puppeteer/ui/menu.py
testing/puppeteer/firefox/requirements-docs.txt
--- a/testing/puppeteer/firefox/firefox_puppeteer/ui/menu.py
+++ b/testing/puppeteer/firefox/firefox_puppeteer/ui/menu.py
@@ -36,18 +36,17 @@ class MenuBar(BaseLib):
                                          'label "{}"'.format(label))
 
         return menu[0]
 
     def get_menu_by_id(self, menu_id):
         """Get a :class:`MenuElement` instance corresponding to the specified
         ID.
 
-        :param menu_id: The ID of the menu, e.g., **file-menu** or
-        **view-menu**.
+        :param menu_id: The ID of the menu, e.g., **file-menu** or **view-menu**.
         :returns: A :class:`MenuElement` instance.
         """
         menu = [m for m in self.menus if m.get_attribute('id') == menu_id]
 
         if not menu:
             raise NoSuchElementException('Could not find a menu with '
                                          'id "{}"'.format(menu_id))
 
@@ -59,19 +58,18 @@ class MenuBar(BaseLib):
         :param label: The label of the menu, e.g., **File** or **View**.
         :param item: The label of the item in the menu, e.g., **New Tab**.
         """
         return self.get_menu(label).select(item)
 
     def select_by_id(self, menu_id, item_id):
         """Select an item in a menu.
 
-        :param menu_id: The ID of the menu, e.g., **file-menu** or **view-menu**.
-        :param item_id: The ID of the item in the menu, e.g.,
-        **menu_newNavigatorTab**.
+        :param menu_id: The ID of the menu, e.g. **file-menu** or **view-menu**.
+        :param item_id: The ID of the item in the menu, e.g. **menu_newNavigatorTab**.
         """
         return self.get_menu_by_id(menu_id).select_by_id(item_id)
 
     class MenuElement(DOMElement):
         """Wraps a menu element DOM element."""
 
         @property
         def items(self):
@@ -94,18 +92,17 @@ class MenuBar(BaseLib):
                            .format(label, self.get_attribute('label')))
                 raise NoSuchElementException(message)
 
             return item[0].click()
 
         def select_by_id(self, menu_item_id):
             """Click on a menu item within this menu.
 
-            :param menu_item_id: The ID of the menu item, e.g.,
-            **menu_newNavigatorTab**.
+            :param menu_item_id: The ID of the menu item, e.g. **menu_newNavigatorTab**.
             """
             item = [l for l in self.items if l.get_attribute('id') ==
                     menu_item_id]
 
             if not item:
                 message = ("Item with ID '{}' not found in the '{}' menu"
                            .format(menu_item_id, self.get_attribute('id')))
                 raise NoSuchElementException(message)
new file mode 100644
--- /dev/null
+++ b/testing/puppeteer/firefox/requirements-docs.txt
@@ -0,0 +1,5 @@
+sphinx
+sphinx_rtd_theme
+
+# Required by Readthedocs to install the firefox-puppeteer package
+-e .