def view_pull_request_commits_tab(webdriver, datasets): pull_request_page = PullRequest(webdriver, project_key=datasets['project_key'], repo_slug=datasets['repo_slug'], pull_request_key=datasets['pull_request_id']) @print_timing("selenium_view_pull_request_commits") def measure(): pull_request_page.go_to_commits() pull_request_page.wait_for_commits_tab() PopupManager(webdriver).dismiss_default_popup() measure()
def comment_pull_request_overview(webdriver, datasets): pull_request_page = PullRequest(webdriver, project_key=datasets['project_key'], repo_slug=datasets['repo_slug'], pull_request_key=datasets['pull_request_id']) pull_request_page.go_to() @print_timing("selenium_comment_pull_request_overview") def measure(): PopupManager(webdriver).dismiss_default_popup() pull_request_page.wait_for_overview_tab() PopupManager(webdriver).dismiss_default_popup() pull_request_page.add_overview_comment() pull_request_page.click_save_comment_button() measure()
def view_pull_request_diff_tab(webdriver, datasets): pull_request_page = PullRequest( webdriver, project_key=datasets['project_key'], repo_slug=datasets['repo_slug'], pull_request_key=datasets['pull_request_id']) @print_timing def measure(webdriver, interaction): pull_request_page.go_to_diff() pull_request_page.wait_for_diff_tab(interaction) PopupManager(webdriver).dismiss_default_popup() measure(webdriver, 'selenium_view_pull_request_diff')
def comment_pull_request_diff(webdriver, datasets): pull_request_page = PullRequest(webdriver, project_key=datasets['project_key'], repo_slug=datasets['repo_slug'], pull_request_key=datasets['pull_request_id']) pull_request_page.go_to_diff() @print_timing("selenium_comment_pull_request_file") def measure(): PopupManager(webdriver).dismiss_default_popup() pull_request_page.wait_for_diff_tab() PopupManager(webdriver).dismiss_default_popup() pull_request_page.wait_for_code_diff() PopupManager(webdriver).dismiss_default_popup() pull_request_page.click_inline_comment_button_js() pull_request_page.add_code_comment() measure()
def sub_measure(): PopupManager(webdriver).dismiss_default_popup() pull_request_page = PullRequest(webdriver) pull_request_page.wait_for_overview_tab() PopupManager(webdriver).dismiss_default_popup() pull_request_page.merge_pull_request()
def measure(webdriver, interaction): PopupManager(webdriver).dismiss_default_popup() pull_request_page = PullRequest(webdriver) pull_request_page.wait_for_overview_tab(interaction) PopupManager(webdriver).dismiss_default_popup() pull_request_page.merge_pull_request(interaction)