fix flaky progress page and note tests
This commit is contained in:
@@ -5,6 +5,7 @@ import datetime
|
||||
|
||||
from bok_choy.page_object import PageObject
|
||||
from bok_choy.promise import EmptyPromise
|
||||
from bok_choy.javascript import js_defined, wait_for_js
|
||||
|
||||
from selenium.webdriver import ActionChains
|
||||
from selenium.webdriver.support.ui import Select
|
||||
@@ -18,6 +19,7 @@ from common.test.acceptance.pages.studio.container import ContainerPage
|
||||
from common.test.acceptance.pages.studio.utils import set_input_value_and_save, set_input_value
|
||||
|
||||
|
||||
@js_defined('jQuery')
|
||||
class CourseOutlineItem(object):
|
||||
"""
|
||||
A mixin class for any :class:`PageObject` shown in a course outline.
|
||||
@@ -174,6 +176,7 @@ class CourseOutlineItem(object):
|
||||
element = self.q(css=self._bounded_selector(".status-grading-value")) # pylint: disable=no-member
|
||||
return element.first.text[0] if element.present else None
|
||||
|
||||
@wait_for_js
|
||||
def publish(self):
|
||||
"""
|
||||
Publish the unit.
|
||||
|
||||
@@ -436,7 +436,7 @@ class CoursewareMultipleVerticalsTest(UniqueCourseTest, EventsTestMixin):
|
||||
self.courseware_page.visit()
|
||||
self.course_nav = CourseNavPage(self.browser)
|
||||
|
||||
@flaky #TODO: fix this, see TNL-5762
|
||||
@flaky # TODO: fix this, see TNL-5762
|
||||
def test_navigation_buttons(self):
|
||||
# start in first section
|
||||
self.assert_navigation_state('Test Section 1', 'Test Subsection 1,1', 0, next_enabled=True, prev_enabled=False)
|
||||
|
||||
@@ -274,7 +274,7 @@ class EdxNotesDefaultInteractionsTest(EdxNotesTestMixin):
|
||||
components = self.note_unit_page.components
|
||||
self.assert_notes_are_removed(components)
|
||||
|
||||
@flaky #TODO: fix this, see TNL-6494
|
||||
@flaky # TODO: fix this, see TNL-6494
|
||||
def test_can_create_note_with_tags(self):
|
||||
"""
|
||||
Scenario: a user of notes can define one with tags
|
||||
@@ -1062,7 +1062,7 @@ class EdxNotesPageTest(EventsTestMixin, EdxNotesTestMixin):
|
||||
self.assertNotIn(u"Search Results", self.notes_page.tabs)
|
||||
self.assertEqual(len(self.notes_page.notes), 5)
|
||||
|
||||
@flaky #TODO: fix this, see TNL-6493
|
||||
@flaky # TODO: fix this, see TNL-6493
|
||||
def test_open_note_when_accessed_from_notes_page(self):
|
||||
"""
|
||||
Scenario: Ensure that the link to the Unit opens a note only once.
|
||||
@@ -1117,6 +1117,7 @@ class EdxNotesPageTest(EventsTestMixin, EdxNotesTestMixin):
|
||||
note = self.note_unit_page.notes[0]
|
||||
self.assertFalse(note.is_visible)
|
||||
self.courseware_page.go_to_sequential_position(1)
|
||||
self.courseware_page.wait_for_ajax()
|
||||
note = self.note_unit_page.notes[0]
|
||||
self.assertFalse(note.is_visible)
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ progress page.
|
||||
"""
|
||||
import ddt
|
||||
|
||||
from bok_choy.javascript import js_defined
|
||||
from contextlib import contextmanager
|
||||
from nose.plugins.attrib import attr
|
||||
from flaky import flaky
|
||||
@@ -127,7 +126,6 @@ class ProgressPageBaseTest(UniqueCourseTest):
|
||||
|
||||
@attr(shard=9)
|
||||
@ddt.ddt
|
||||
@js_defined('window.jQuery')
|
||||
class PersistentGradesTest(ProgressPageBaseTest):
|
||||
"""
|
||||
Test that grades for completed assessments are persisted
|
||||
@@ -229,7 +227,7 @@ class PersistentGradesTest(ProgressPageBaseTest):
|
||||
_change_subsection_structure,
|
||||
_change_weight_for_problem
|
||||
)
|
||||
@flaky #TODO: fix this, see TNL-6040
|
||||
@flaky # TODO: fix this, see TNL-6040
|
||||
def test_content_changes_do_not_change_score(self, edit):
|
||||
with self._logged_in_session():
|
||||
self.courseware_page.visit()
|
||||
|
||||
Reference in New Issue
Block a user