add history view test

This commit is contained in:
Evgeny Anatskiy
2017-09-07 13:47:40 +02:00
parent bca6dfefb6
commit da42c16ae7
+19 -12
View File
@@ -20,6 +20,25 @@ class SavedHistoriesTestCase(SeleniumTestCase):
# self.assert_grid_histories_are([HISTORY3_NAME, HISTORY2_NAME, 'Unnamed history'])
self.assert_history_in_grid(HISTORY2_NAME)
@selenium_test
def test_history_switch(self):
self.navigate_to_saved_histories_page()
self.click_popup_option(HISTORY2_NAME, 'Switch')
time.sleep(1)
selector = '#current-history-panel .name.editable-text'
history_name = self.wait_for_selector(selector)
self.assertEqual(history_name.text, HISTORY2_NAME)
@selenium_test
def test_history_view(self):
self.navigate_to_saved_histories_page()
self.click_popup_option(HISTORY2_NAME, 'View')
history_name = self.wait_for_selector('.name.editable-text')
self.assertEqual(history_name.text, HISTORY2_NAME)
@selenium_test
def test_rename_history(self):
self.navigate_to_saved_histories_page()
@@ -59,18 +78,6 @@ class SavedHistoriesTestCase(SeleniumTestCase):
self.assert_history_in_grid(HISTORY2_NAME)
@selenium_test
def test_history_switch(self):
self.navigate_to_saved_histories_page()
self.click_popup_option(HISTORY2_NAME, 'Switch')
time.sleep(1)
selector = '#current-history-panel .name.editable-text'
history_name = self.wait_for_selector(selector)
self.assertEqual(history_name.text, HISTORY2_NAME)
def assert_grid_histories_are(self, expected_histories, sort_matters=True):
actual_histories = self.get_histories()
if not sort_matters: