示例#1
0
 def open_feedback(self, locale=None):
     self.find_element(*self._feedback_link_locator).click()
     # import needs to be here to avoid circular reference
     from pages.article import ArticlePage
     url_kwargs = dict(locale=locale) if locale else dict()
     feedback_page = ArticlePage(self.selenium, self.page.base_url,
                                 **url_kwargs)
     feedback_page.URL_TEMPLATE = '/{locale}/docs/MDN/Feedback'
     return feedback_page.wait_for_page_to_load()
示例#2
0
 def publish(self):
     from pages.article import ArticlePage
     publish_button = self.find_element(*self._save_button_locator)
     publish_button.click()
     # wait for article page to load
     published_page = ArticlePage(self.selenium, self.base_url,
                                  **self.url_kwargs)
     published_page.URL_TEMPLATE = '/{locale}/docs/' + self.DOC_SLUG
     return published_page.wait_for_page_to_load()
示例#3
0
文件: base.py 项目: safwanrahman/kuma
 def open_feedback(self, locale=None):
     self.find_element(*self._feedback_link_locator).click()
     # import needs to be here to avoid circular reference
     from pages.article import ArticlePage
     url_kwargs = dict(locale=locale) if locale else dict()
     feedback_page = ArticlePage(self.selenium,
                                 self.page.base_url,
                                 **url_kwargs)
     feedback_page.URL_TEMPLATE = '/{locale}/docs/MDN/Feedback'
     return feedback_page.wait_for_page_to_load()
示例#4
0
 def publish(self):
     from pages.article import ArticlePage
     publish_button = self.find_element(*self._save_button_locator)
     publish_button.click()
     # wait for article page to load
     published_page = ArticlePage(
         self.selenium,
         self.base_url,
         **self.url_kwargs
     )
     published_page.URL_TEMPLATE = '/{locale}/docs/' + self.DOC_SLUG
     return published_page.wait_for_page_to_load()