Ejemplo n.º 1
0
 def get_submission_log_page(self):
     if self.URL:
         self.driver.go_to(self.URL)
         submission_log_page = SubmissionLogPage(self.driver)
     else:
         submission_log_page = self.go_to_submission_log_page()
     return submission_log_page
Ejemplo n.º 2
0
    def navigate_to_submission_log_page(self, project_name):
        """
        Function to navigate to all data records page of the website

        Return All Data Records page
         """
        self.driver.find(by_xpath(All_DATA_RECORDS_LINK_XPATH % project_name)).click()
        return SubmissionLogPage(self.driver)
Ejemplo n.º 3
0
    def navigate_to_all_data_record_page(self):
        """
        Function to navigate all data record page

        Return data all data record
         """
        self.driver.find(ALL_DATA_RECORDS_LINK).click()
        return SubmissionLogPage(self.driver)
Ejemplo n.º 4
0
 def get_first_project_submission_log_page(self):
     if self.URL:
         self.driver.go_to(self.URL)
         submission_log_page = SubmissionLogPage(self.driver)
     else:
         submission_log_page = self.go_to_submission_log_page()
         if not self.URL:
             self.URL = self.driver.current_url
     return submission_log_page
Ejemplo n.º 5
0
    def navigate_to_all_data_record_page(self):
        """
        Function to navigate all data record page

        Return data all data record
         """
        self.driver.find(ALL_DATA_RECORDS_LINK).click()
        self.driver.wait_for_element(20, by_css("table.submission_table"))
        return SubmissionLogPage(self.driver)
Ejemplo n.º 6
0
 def navigate_to_submission_log(self):
     try:
         self.driver.wait_for_element(UI_TEST_TIMEOUT * 4,
                                      by_id('submission_log_link'),
                                      True).click()
     except Exception as e:
         self.driver.create_screenshot(
             "debug-ft-navigate-to-sub-log-failing")
         raise e
     return SubmissionLogPage(self.driver)
Ejemplo n.º 7
0
 def navigate_to_submission_log(self):
     self.driver.find_elements_by_css_selector('.secondary_tab .inactive>a')[1].click()
     return SubmissionLogPage(self.driver)
Ejemplo n.º 8
0
 def navigate_to_submission_log(self):
     self.driver.wait_for_element(UI_TEST_TIMEOUT,
                                  by_id('submission_log_link'),
                                  True).click()
     return SubmissionLogPage(self.driver)
Ejemplo n.º 9
0
    def admin_edit_delete_submissions(self):
        submission_log_page = SubmissionLogPage(self.driver)
        submission_log_page.search(fetch_(ANSWER, WEB_ANSWERS[5]))
        submission_log_page.check_submission_by_row_number(1)
        submission_log_page.choose_on_dropdown_action(EDIT_BUTTON)

        submission_page = WebSubmissionPage(self.driver)
        submission_page.fill_and_submit_answer(EDITED_WEB_ANSWERS)
        self.verify_submission(EDITED_WEB_ANSWER_LOG, self.project_name)

        submission_log_page.check_all_submissions()
        submission_log_page.choose_on_dropdown_action(DELETE_BUTTON)
        warning_dialog = WarningDialog(self.driver)
        warning_dialog.confirm()
        submission_log_page.wait_for_table_data_to_load()
        self.assertTrue(submission_log_page.empty_help_text())