PLAT-1198 Reduce risk of losing navigation events
This commit is contained in:
@@ -131,7 +131,10 @@ class CoursewarePage(CoursePage):
|
||||
against the case where the page is still being loaded.
|
||||
"""
|
||||
active_tab = self._active_sequence_tab
|
||||
return active_tab and int(active_tab.attrs('data-element')[0]) == sequential_position
|
||||
try:
|
||||
return active_tab and int(active_tab.attrs('data-element')[0]) == sequential_position
|
||||
except IndexError:
|
||||
return False
|
||||
|
||||
sequential_position_css = '#sequence-list #tab_{0}'.format(sequential_position - 1)
|
||||
self.q(css=sequential_position_css).first.click()
|
||||
@@ -181,7 +184,10 @@ class CoursewarePage(CoursePage):
|
||||
against the case where the page is still being loaded.
|
||||
"""
|
||||
active_tab = self._active_sequence_tab
|
||||
return active_tab and previous_tab_id != active_tab.attrs('data-id')[0]
|
||||
try:
|
||||
return active_tab and previous_tab_id != active_tab.attrs('data-id')[0]
|
||||
except IndexError:
|
||||
return False
|
||||
|
||||
self.q(
|
||||
css='.{} > .sequence-nav-button.{}'.format(top_or_bottom_class, next_or_previous_class)
|
||||
|
||||
@@ -5,7 +5,6 @@ End-to-end tests for the LMS.
|
||||
|
||||
import json
|
||||
from datetime import datetime, timedelta
|
||||
from unittest import skip
|
||||
|
||||
import ddt
|
||||
from flaky import flaky
|
||||
@@ -441,7 +440,7 @@ class CoursewareMultipleVerticalsTest(CoursewareMultipleVerticalsTestBase):
|
||||
Test courseware with multiple verticals
|
||||
"""
|
||||
|
||||
@skip('Disable temporarily to get course bookmarks out')
|
||||
@flaky # PLAT-1198; should be fixed, but verify that failures stop before removing
|
||||
def test_navigation_buttons(self):
|
||||
self.courseware_page.visit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user