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
2839a7b3
Commit
2839a7b3
authored
Jan 08, 2015
by
Andy Armstrong
Committed by
Zia Fazal
Apr 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add back missing 'New Post" button
TNL-1097
parent
964e40a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
common/test/acceptance/pages/lms/discussion.py
+22
-0
common/test/acceptance/tests/discussion/test_discussion.py
+27
-0
lms/templates/courseware/course_navigation.html
+1
-0
No files found.
common/test/acceptance/pages/lms/discussion.py
View file @
2839a7b3
...
@@ -567,3 +567,25 @@ class DiscussionTabHomePage(CoursePage, DiscussionPageMixin):
...
@@ -567,3 +567,25 @@ class DiscussionTabHomePage(CoursePage, DiscussionPageMixin):
lambda
:
_match_messages
(
text
)
.
results
==
[],
lambda
:
_match_messages
(
text
)
.
results
==
[],
"waiting for dismissed alerts to disappear"
"waiting for dismissed alerts to disappear"
)
.
fulfill
()
)
.
fulfill
()
def
click_new_post_button
(
self
):
"""
Clicks the 'New Post' button.
"""
self
.
new_post_button
.
click
()
EmptyPromise
(
lambda
:
(
self
.
new_post_form
),
"New post action succeeded"
)
.
fulfill
()
@property
def
new_post_button
(
self
):
elements
=
self
.
q
(
css
=
"ol.course-tabs .new-post-btn"
)
return
elements
.
first
if
elements
.
visible
and
len
(
elements
)
==
1
else
None
@property
def
new_post_form
(
self
):
elements
=
self
.
q
(
css
=
".forum-new-post-form"
)
return
elements
[
0
]
if
elements
.
visible
and
len
(
elements
)
==
1
else
None
common/test/acceptance/tests/discussion/test_discussion.py
View file @
2839a7b3
...
@@ -112,6 +112,33 @@ class DiscussionResponsePaginationTestMixin(BaseDiscussionMixin):
...
@@ -112,6 +112,33 @@ class DiscussionResponsePaginationTestMixin(BaseDiscussionMixin):
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
class
DiscussionHomePageTest
(
UniqueCourseTest
):
"""
Tests for the discussion home page.
"""
SEARCHED_USERNAME
=
"gizmo"
def
setUp
(
self
):
super
(
DiscussionHomePageTest
,
self
)
.
setUp
()
CourseFixture
(
**
self
.
course_info
)
.
install
()
AutoAuthPage
(
self
.
browser
,
course_id
=
self
.
course_id
)
.
visit
()
self
.
page
=
DiscussionTabHomePage
(
self
.
browser
,
self
.
course_id
)
self
.
page
.
visit
()
def
test_new_post_button
(
self
):
"""
Scenario: I can create new posts from the Discussion home page.
Given that I am on the Discussion home page
When I click on the 'New Post' button
Then I should be shown the new post form
"""
self
.
assertIsNotNone
(
self
.
page
.
new_post_button
)
self
.
page
.
click_new_post_button
()
self
.
assertIsNotNone
(
self
.
page
.
new_post_form
)
@attr
(
'shard_1'
)
class
DiscussionTabSingleThreadTest
(
UniqueCourseTest
,
DiscussionResponsePaginationTestMixin
):
class
DiscussionTabSingleThreadTest
(
UniqueCourseTest
,
DiscussionResponsePaginationTestMixin
):
"""
"""
Tests for the discussion page displaying a single thread
Tests for the discussion page displaying a single thread
...
...
lms/templates/courseware/course_navigation.html
View file @
2839a7b3
...
@@ -78,6 +78,7 @@ def url_class(is_active):
...
@@ -78,6 +78,7 @@ def url_class(is_active):
</a>
</a>
</li>
</li>
% endfor
% endfor
<
%
block
name=
"extratabs"
/>
</ol>
</ol>
</div>
</div>
</nav>
</nav>
...
...
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