예제 #1
0
 def has_disabled_project_actions(self):
     self._menu_driver.menu_item(matchers.named("_add_files_action")).is_disabled()
     self._menu_driver.menu_item(matchers.named("_add_folder_action")).is_disabled()
     self._menu_driver.menu_item(matchers.named("_export_action")).is_disabled()
     self._menu_driver.menu_item(matchers.named("_close_project_action")).is_disabled()
     self._menu_driver.menu_item(matchers.named("_save_project_action")).is_disabled()
     self._menu_driver.close()
예제 #2
0
 def shows_signed_in_user(self, email):
     self._menu_driver.menu_item(matchers.named("_sign_in_action")).is_hidden()
     self._menu_driver.menu_item(matchers.named("_logged_user_action")).is_showing_on_screen()
     self._menu_driver.menu_item(matchers.named("_logged_user_action")).is_disabled()
     self._menu_driver.menu_item(matchers.named("_sign_out_action")).is_enabled()
     self._menu_driver.has_menu_item(matchers.with_text(email))
     self._menu_driver.close()
 def displays_refine_query_message(self, total_count, visible=True):
     result_message = self.label(named("_result_message"))
     if visible:
         result_message.is_showing_on_screen()
         result_message.has_text("Your search yielded {} results. Please refine your search.".format(total_count))
     else:
         result_message.is_hidden()
 def shows_no_result_message(self, visible=True):
     result_message = self.label(named("_result_message"))
     if visible:
         result_message.is_showing_on_screen()
         result_message.has_text("Your query yielded no result.")
     else:
         result_message.is_hidden()
예제 #5
0
 def remove_selected_track(self, using="shortcut"):
     if using == "shortcut":
         self.perform(gestures.delete_previous())
     elif using == "menu":
         self._from_context_menu().select_menu_item(named("_remove_action"))
     elif using == "button":
         self.remove_button.click()
     else:
         raise AssertionError("Don't know how to remove a track using {}", using)
예제 #6
0
 def _recent_projects_list(self):
     return QListViewDriver.find_single(self, QListView,
                                        named("recent_projects_list"))
 def shows_compilation(self, value):
     compilation_checkbox = self.checkbox(named("_compilation"))
     compilation_checkbox.is_checked(value)
 def remove_artwork(self):
     self.tool_button(named("_remove_artwork_button")).click()
 def shows_release_type(self, type_):
     self._select_release_tab()
     self.label(with_buddy(named("_release_type"))).is_showing_on_screen()
     edit = self.lineEdit(named("_release_type"))
     edit.is_disabled()
     edit.has_text(type_)
 def shows_upc(self, code):
     self._select_release_tab()
     self.label(with_buddy(named("_barcode"))).is_showing_on_screen()
     self.lineEdit(named("_barcode")).has_text(code)
 def _select_release_tab(self):
     self.tabs(named("_tabs")).select("2. Release")
 def _individual_button(self):
     return self.radio(named("_individual_button"))
 def shows_insufficient_error_message(self, visible=True):
     if visible:
         self.label(
             named("_insufficient_error_message")).is_showing_on_screen()
     else:
         self.label(named("_insufficient_error_message")).is_hidden()
 def shows_connection_error_message(self, visible=True):
     if visible:
         self.label(
             named("_connection_error_message")).is_showing_on_screen()
     else:
         self.label(named("_connection_error_message")).is_hidden()
 def _main_artist_section(self):
     return WidgetDriver.find_single(self, QWidget,
                                     named("_main_artist_box"))
예제 #16
0
 def _publishers_table(self):
     table = TableViewDriver.find_single(self, QTableWidget,
                                         named("_publishers_table"))
     table.is_showing_on_screen()
     return table
예제 #17
0
def export_as_dialog(parent):
    return ExportAsDialogDriver(window(QFileDialog, named('export-as-dialog')),
                                parent.prober, parent.gesture_performer)
예제 #18
0
def driver(prober, automaton):
    dialog_driver = SaveAsDialogDriver(
        window(QFileDialog, named("save_as_dialog")), prober, automaton)
    yield dialog_driver
    close_(dialog_driver)
 def main_artist_date_of_birth(self, year, month, day):
     self.dateEdit(named("_main_artist_date_of_birth")).enter_date(year, month, day)
 def _organization_button(self):
     return self.radio(named("_organization_button"))
 def shows_catalog_number(self, number):
     self._select_release_tab()
     self.label(with_buddy(named("_catalog_number"))).is_showing_on_screen()
     self.lineEdit(named("_catalog_number")).has_text(number)
 def _progress_indicator(self):
     return WidgetDriver.find_single(self, QProgressIndicator,
                                     named("_progress_indicator"))
 def shows_release_time(self, time):
     self._select_release_tab()
     self.label(with_buddy(named("_release_time"))).is_showing_on_screen()
     self.dateEdit(named("_release_time")).has_date(time)
 def _works_list(self):
     return self.list_view(named("_works"))
def project_edition_page(parent):
    return ProjectEditionPageDriver.find_single(parent, ProjectEditionPage, named("project_edition_page"))
 def _name_label(self):
     return self.label(named("_name"))
 def shows_title(self, name):
     self.label(with_buddy(named("_title"))).is_showing_on_screen()
     self.lineEdit(named("_title")).has_text(name)
예제 #28
0
def driver(prober, automaton):
    dialog_driver = AboutDialogDriver(
        window(AboutDialog, named("about_tgit_dialog")), prober, automaton)
    yield dialog_driver
    close_(dialog_driver)
def select_project_destination_dialog(parent):
    return SelectProjectDestinationDialogDriver(window(QFileDialog, named("select_project_destination_dialog")),
                                                parent.prober, parent.gesture_performer)
예제 #30
0
def driver_with_close_delay(prober, automaton):
    dialog_driver = AboutDialogDriver(
        window(AboutDialog, named("about_tgit_dialog")), prober, automaton)
    yield dialog_driver
    close_(dialog_driver, pause=PAUSE_AFTER_CLOSE)
예제 #31
0
 def _open_project_button(self):
     return ButtonDriver.find_single(self, QAbstractButton,
                                     named("open_project_button"))
 def change_main_artist_isni(self, isni):
     self.lineEdit(named("_main_artist_isni")).change_text(isni)
예제 #33
0
def driver(prober, automaton):
    dialog_driver = LoadProjectDialogDriver(
        window(QFileDialog, named("load_project_dialog")), prober, automaton)
    yield dialog_driver
    close_(dialog_driver)
예제 #34
0
 def _load_project_button(self):
     return self.button(named("load_project_button"))
 def change_main_artist(self, name):
     self.lineEdit(named("_main_artist")).change_text(name)
예제 #36
0
def project_screen(parent):
    return ProjectScreenDriver.find_single(parent, ProjectScreen,
                                           named("project_screen"))
 def change_main_artist_region(self, name):
     self.lineEdit(named("_main_artist_region")).change_text(name)
예제 #38
0
 def shows_pages_in_navigation_combo(self, *pages):
     self.combobox(named("_pages_navigation")).has_options(*pages)
 def shows_label_name(self, name):
     self._select_release_tab()
     self.label(with_buddy(named("_label_name"))).is_showing_on_screen()
     self.lineEdit(named("_label_name")).has_text(name)
예제 #40
0
 def to_previous_page(self):
     self.button(named("_previous")).click()
 def change_label_name(self, name):
     self._select_release_tab()
     self.lineEdit(named("_label_name")).change_text(name)
예제 #42
0
 def to_next_page(self):
     self.button(named("_next")).click()
 def change_catalog_number(self, number):
     self._select_release_tab()
     self.lineEdit(named("_catalog_number")).change_text(number)
예제 #44
0
 def to_page(self, name):
     self.combobox(named("_pages_navigation")).select_option(name)
 def change_upc(self, code):
     self._select_release_tab()
     self.lineEdit(named("_barcode")).change_text(code)
예제 #46
0
 def shows_page_in_navigation_combo(self, name):
     self.combobox(named("_pages_navigation")).has_current_text(name)
 def change_release_time(self, year, month, day):
     self._select_release_tab()
     self.dateEdit(named("_release_time")).enter_date(year, month, day)
예제 #48
0
 def does_not_show_page_in_navigation_combo(self, name):
     self.combobox(named("_pages_navigation")).has_no_option(name)
 def _displays_picture_with_size(self, width, height):
     label = self.label(named("_front_cover"))
     label.is_showing_on_screen()
     label.has_pixmap(with_pixmap_size(width, height))
예제 #50
0
 def shows_previous_page_button(self, enabled=True):
     self.button(named("_previous")).is_enabled(enabled)
 def add_artwork(self):
     self.tool_button(named("_select_artwork_button")).click()
예제 #52
0
 def shows_next_page_button(self, enabled=True):
     self.button(named("_next")).is_enabled(enabled)
 def lookup_isni_of_main_artist(self):
     self.tool_button(named("_main_artist_isni_actions_button")).click()
예제 #54
0
 def links_help_to(self, location):
     self.label(named("help_link")).has_text(
         contains_string("href=\"{0}\"".format(location)))
 def change_title(self, name):
     self.lineEdit(named("_title")).change_text(name)
예제 #56
0
 def links_feature_request_to(self, location):
     self.label(named("feature_request_link")).has_text(
         contains_string("href=\"{0}".format(location)))
 def toggle_compilation(self):
     compilation_checkbox = self.checkbox(named("_compilation"))
     compilation_checkbox.click()
def driver(prober, automaton):
    return TrackSelectionDialogDriver(
        window(QFileDialog, named('track-selection-dialog')), prober,
        automaton)
 def _publishers_table(self):
     table = TableViewDriver.find_single(self, QTableWidget, named("_publishers_table"))
     table.is_showing_on_screen()
     return table
예제 #60
0
 def new_project(self, of_type="mp3"):
     self.button(named("new_{}_project_button".format(of_type))).click()