Skip to content

Commit

Permalink
test/selenium_tests/test_library_contents.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerdinacan committed Nov 6, 2018
1 parent 2f21532 commit a8eb946
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/selenium_tests/test_library_contents.py
@@ -1,8 +1,10 @@
from .framework import (
retry_assertion_during_transitions,
retry_during_transitions,
selenium_test,
SeleniumTestCase,
)
from selenium.webdriver.support.ui import Select


class LibraryContentsTestCase(SeleniumTestCase):
Expand Down Expand Up @@ -31,6 +33,9 @@ def test_import_dataset_from_history(self):
self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_modal)

self.libraries_dataset_import_from_history()
# Need to select the right item on the dropdown
self._select_history_option("dataset_add_bulk", "Unnamed history")
self.sleep_for(self.wait_types.UX_RENDER)
self.libraries_dataset_import_from_history_select(["1.txt"])
# Add
self.sleep_for(self.wait_types.UX_RENDER)
Expand Down Expand Up @@ -99,3 +104,8 @@ def _navigate_to_new_library(self, login=True):
self.name = self._get_random_name(prefix="testcontents")
self.libraries_index_create(self.name)
self.libraries_open_with_name(self.name)

@retry_during_transitions
def _select_history_option(self, select_id, label_text):
select = Select(self.driver.find_element_by_id(select_id))
select.select_by_visible_text(label_text)

0 comments on commit a8eb946

Please sign in to comment.