Adjust selenium tests for new numbering

This commit is contained in:
mvdbeek
2024-01-11 13:34:29 +01:00
parent 103f6bdba5
commit e4f8315c2b
3 changed files with 20 additions and 14 deletions
@@ -17,7 +17,7 @@ class TestCollectionBuilders(SeleniumTestCase):
self.collection_builder_set_name("my cool list")
self.screenshot("collection_builder_list")
self.collection_builder_create()
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)
@selenium_test
@managed_history
@@ -30,7 +30,6 @@ class TestCollectionBuilders(SeleniumTestCase):
self.collection_builder_hide_originals()
self.collection_builder_set_name("my cool list")
self.collection_builder_create()
self.home() # this shouldn't be necessary, and it isn't with a real browser.
self._wait_for_hid_visible(3)
@selenium_test
@@ -43,7 +42,7 @@ class TestCollectionBuilders(SeleniumTestCase):
self.collection_builder_set_name("my awesome pair")
self.screenshot("collection_builder_pair")
self.collection_builder_create()
self._wait_for_hid_visible(3)
self._wait_for_hid_visible(5)
@selenium_test
@managed_history
@@ -58,11 +57,13 @@ class TestCollectionBuilders(SeleniumTestCase):
self.collection_builder_set_name("my awesome paired list")
self.screenshot("collection_builder_paired_list")
self.collection_builder_create()
self._wait_for_hid_visible(3)
self._wait_for_hid_visible(5)
# switch to hidden filters to see the hidden datasets appear
self._show_hidden_content()
self._wait_for_hid_visible(1)
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)
self._wait_for_hid_visible(4)
@selenium_test
@managed_history
@@ -98,9 +99,10 @@ class TestCollectionBuilders(SeleniumTestCase):
self.collection_builder_set_name("my cool list")
self.screenshot("collection_builder_rules_list")
self.collection_builder_create()
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)
self._show_hidden_content()
self._wait_for_hid_visible(1)
self._wait_for_hid_visible(2)
def _wait_for_hid_visible(self, hid, state="ok"):
# takes a little while for these things to upload and end up in the history
@@ -20,7 +20,7 @@ class TestCollectionEdit(SeleniumTestCase):
self.check_current_data_value(dataValue)
dataNew = "hg17"
self.change_dbkey_value_and_click_submit(dataValue, dataNew)
self.history_panel_wait_for_hid_ok(4)
self.history_panel_wait_for_hid_ok(5)
self.open_collection_edit_view()
self.navigate_to_database_tab()
self.check_current_data_value(dataNew)
@@ -42,7 +42,7 @@ class TestCollectionEdit(SeleniumTestCase):
self.change_datatype_value_and_click_submit(dataValue, dataNew)
self.check_current_data_value(dataNew)
self.wait_for_history()
self.history_panel_expand_collection(2)
self.history_panel_expand_collection(3)
self.history_panel_ensure_showing_item_details(1)
item = self.history_panel_item_component(hid=1)
item.datatype.wait_for_visible()
@@ -56,7 +56,7 @@ class TestCollectionEdit(SeleniumTestCase):
self.collection_builder_set_name("my cool list")
self.collection_builder_create()
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)
def open_collection_edit_view(self):
self.components.history_panel.collection_menu_edit_attributes.wait_for_and_click()
+10 -6
View File
@@ -118,11 +118,11 @@ class TestUploads(SeleniumTestCase, UsesHistoryItemAssertions):
@selenium_test
def test_upload_list(self):
self.upload_list([self.get_filename("1.tabular")], name="Test List")
self.history_panel_wait_for_hid_ok(2)
self.history_panel_wait_for_hid_ok(3)
# Make sure modals disappeared - both List creator (TODO: upload).
self.wait_for_selector_absent_or_hidden(".collection-creator")
self.assert_item_name(2, "Test List")
self.assert_item_name(3, "Test List")
# Make sure source item is hidden when the collection is created.
self.history_panel_wait_for_hid_hidden(1)
@@ -130,15 +130,17 @@ class TestUploads(SeleniumTestCase, UsesHistoryItemAssertions):
@selenium_test
def test_upload_pair(self):
self.upload_list([self.get_filename("1.tabular"), self.get_filename("2.tabular")], name="Test Pair")
self.history_panel_wait_for_hid_ok(3)
self.history_panel_wait_for_hid_ok(5)
# Make sure modals disappeared - both collection creator (TODO: upload).
self.wait_for_selector_absent_or_hidden(".collection-creator")
self.assert_item_name(3, "Test Pair")
self.assert_item_name(5, "Test Pair")
# Make sure source items are hidden when the collection is created.
self.history_panel_wait_for_hid_hidden(1)
self.history_panel_wait_for_hid_hidden(2)
self.history_panel_wait_for_hid_hidden(3)
self.history_panel_wait_for_hid_hidden(4)
@selenium_test
def test_upload_pair_specify_extension(self):
@@ -161,14 +163,16 @@ class TestUploads(SeleniumTestCase, UsesHistoryItemAssertions):
self.upload_paired_list(
[self.get_filename("1.tabular"), self.get_filename("2.tabular")], name="Test Paired List"
)
self.history_panel_wait_for_hid_ok(3)
self.history_panel_wait_for_hid_ok(5)
# Make sure modals disappeared - both collection creator (TODO: upload).
self.wait_for_selector_absent_or_hidden(".collection-creator")
self.assert_item_name(3, "Test Paired List")
self.assert_item_name(5, "Test Paired List")
# Make sure source items are hidden when the collection is created.
self.history_panel_wait_for_hid_hidden(1)
self.history_panel_wait_for_hid_hidden(2)
self.history_panel_wait_for_hid_hidden(3)
self.history_panel_wait_for_hid_hidden(4)
@selenium_test
@pytest.mark.gtn_screenshot