Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
fa2b84d9
Commit
fa2b84d9
authored
May 08, 2015
by
Ben Patterson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7968 from edx/benp/fix-cohort-flakiness
Ensure cohort management section has loaded.
parents
2b6ad20f
609feaae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
common/test/acceptance/pages/lms/instructor_dashboard.py
+19
-8
common/test/acceptance/tests/discussion/test_cohort_management.py
+0
-2
No files found.
common/test/acceptance/pages/lms/instructor_dashboard.py
View file @
fa2b84d9
...
@@ -34,6 +34,8 @@ class InstructorDashboardPage(CoursePage):
...
@@ -34,6 +34,8 @@ class InstructorDashboardPage(CoursePage):
"""
"""
self
.
q
(
css
=
'a[data-section=cohort_management]'
)
.
first
.
click
()
self
.
q
(
css
=
'a[data-section=cohort_management]'
)
.
first
.
click
()
cohort_management_section
=
CohortManagementSection
(
self
.
browser
)
cohort_management_section
=
CohortManagementSection
(
self
.
browser
)
# The first time cohort management is selected, an ajax call is made.
cohort_management_section
.
wait_for_ajax
()
cohort_management_section
.
wait_for_page
()
cohort_management_section
.
wait_for_page
()
return
cohort_management_section
return
cohort_management_section
...
@@ -111,7 +113,21 @@ class CohortManagementSection(PageObject):
...
@@ -111,7 +113,21 @@ class CohortManagementSection(PageObject):
}
}
def
is_browser_on_page
(
self
):
def
is_browser_on_page
(
self
):
return
self
.
q
(
css
=
'.cohort-management'
)
.
present
"""
Cohorts management exists under one class; however, render time can be longer because of sub-classes
that must be rendered beneath it. To determine if the browser is on the cohorts management page (and
allow for it to fully-render), we need to consider three different states of the page:
* When no cohorts have been added yet
* When a new cohort is being added (a confirmation state)
* When cohorts exist (the traditional management page)
"""
cohorts_warning_title
=
'.message-warning .message-title'
if
self
.
q
(
css
=
cohorts_warning_title
)
.
visible
:
return
self
.
q
(
css
=
'.message-title'
)
.
text
[
0
]
==
u'You currently have no cohorts configured'
# The page may be in either the traditional management state, or an 'add new cohort' state.
# Confirm the CSS class is visible because the CSS class can exist on the page even in different states.
return
self
.
q
(
css
=
'.cohort-management-nav'
)
.
visible
or
self
.
q
(
css
=
'.new-cohort-form'
)
.
visible
def
_bounded_selector
(
self
,
selector
):
def
_bounded_selector
(
self
,
selector
):
"""
"""
...
@@ -480,13 +496,8 @@ class CohortManagementSection(PageObject):
...
@@ -480,13 +496,8 @@ class CohortManagementSection(PageObject):
"""
"""
Shows the discussion topics.
Shows the discussion topics.
"""
"""
EmptyPromise
(
self
.
q
(
css
=
self
.
_bounded_selector
(
".toggle-cohort-management-discussions"
))
.
first
.
click
()
lambda
:
self
.
q
(
css
=
self
.
_bounded_selector
(
'.toggle-cohort-management-discussions'
))
.
results
!=
0
,
self
.
wait_for_element_visibility
(
"#cohort-management-discussion-topics"
,
"Waiting for discussions to appear"
)
"Waiting for discussion section to show"
)
.
fulfill
()
# If the discussion topic section has not yet been toggled on, click on the toggle link.
self
.
q
(
css
=
self
.
_bounded_selector
(
".toggle-cohort-management-discussions"
))
.
click
()
def
discussion_topics_visible
(
self
):
def
discussion_topics_visible
(
self
):
"""
"""
...
...
common/test/acceptance/tests/discussion/test_cohort_management.py
View file @
fa2b84d9
...
@@ -4,7 +4,6 @@ End-to-end tests related to the cohort management on the LMS Instructor Dashboar
...
@@ -4,7 +4,6 @@ End-to-end tests related to the cohort management on the LMS Instructor Dashboar
"""
"""
from
datetime
import
datetime
from
datetime
import
datetime
from
flaky
import
flaky
from
pytz
import
UTC
,
utc
from
pytz
import
UTC
,
utc
from
bok_choy.promise
import
EmptyPromise
from
bok_choy.promise
import
EmptyPromise
...
@@ -719,7 +718,6 @@ class CohortDiscussionTopicsTest(UniqueCourseTest, CohortTestMixin):
...
@@ -719,7 +718,6 @@ class CohortDiscussionTopicsTest(UniqueCourseTest, CohortTestMixin):
self
.
reload_page
()
self
.
reload_page
()
self
.
assertEqual
(
self
.
cohort_management_page
.
get_cohorted_topics_count
(
key
),
cohorted_topics
)
self
.
assertEqual
(
self
.
cohort_management_page
.
get_cohorted_topics_count
(
key
),
cohorted_topics
)
@flaky
# TODO: fix this, see TNL-2120
def
test_cohort_course_wide_discussion_topic
(
self
):
def
test_cohort_course_wide_discussion_topic
(
self
):
"""
"""
Scenario: cohort a course-wide discussion topic.
Scenario: cohort a course-wide discussion topic.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment