Add course goals bokchoy test.
LEARNER-2641
This commit is contained in:
@@ -32,6 +32,15 @@ class CourseHomePage(CoursePage):
|
||||
# TODO: TNL-6546: Remove the following
|
||||
self.course_outline_page = False
|
||||
|
||||
def select_course_goal(self):
|
||||
""" Click on a course goal in a message """
|
||||
self.q(css='.goal-option').first.click()
|
||||
self.wait_for_ajax()
|
||||
|
||||
def is_course_goal_success_message_shown(self):
|
||||
""" Verifies course goal success message appears. """
|
||||
return self.q(css='.success-message').present
|
||||
|
||||
def click_bookmarks_button(self):
|
||||
""" Click on Bookmarks button """
|
||||
self.q(css='.bookmarks-list-button').first.click()
|
||||
|
||||
@@ -5,6 +5,8 @@ End-to-end tests for the LMS that utilize the course home page and course outlin
|
||||
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
from common.test.acceptance.pages.lms.create_mode import ModeCreationPage
|
||||
|
||||
from ...fixtures.course import CourseFixture, XBlockFixtureDesc
|
||||
from ...pages.lms.bookmarks import BookmarksPage
|
||||
from ...pages.lms.course_home import CourseHomePage
|
||||
@@ -64,8 +66,12 @@ class CourseHomeTest(CourseHomeBaseTest):
|
||||
|
||||
def test_course_home(self):
|
||||
"""
|
||||
Smoke test of course outline, breadcrumbs to and from course outline, and bookmarks.
|
||||
Smoke test of course goals, course outline, breadcrumbs to and from course outline, and bookmarks.
|
||||
"""
|
||||
ModeCreationPage(
|
||||
self.browser, self.course_id, mode_slug=u'verified',
|
||||
mode_display_name='verified', min_price=10
|
||||
).visit()
|
||||
self.course_home_page.visit()
|
||||
|
||||
# TODO: TNL-6546: Remove course_outline_page.
|
||||
@@ -75,6 +81,12 @@ class CourseHomeTest(CourseHomeBaseTest):
|
||||
# Check that the tab lands on the course home page.
|
||||
self.assertTrue(self.course_home_page.is_browser_on_page())
|
||||
|
||||
# Check that a success message is shown when selecting a course goal
|
||||
# TODO: LEARNER-2522: Ensure the correct message shows up for a particular goal choice
|
||||
self.assertFalse(self.course_home_page.is_course_goal_success_message_shown())
|
||||
self.course_home_page.select_course_goal()
|
||||
self.assertTrue(self.course_home_page.is_course_goal_success_message_shown())
|
||||
|
||||
# Check that the course navigation appears correctly
|
||||
EXPECTED_SECTIONS = {
|
||||
'Test Section': ['Test Subsection'],
|
||||
|
||||
File diff suppressed because one or more lines are too long
18
common/test/db_fixtures/waffle_flags.json
Normal file
18
common/test/db_fixtures/waffle_flags.json
Normal file
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "waffle.flag",
|
||||
"fields": {
|
||||
"name": "course_experience.course_outline_page",
|
||||
"everyone": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "waffle.flag",
|
||||
"fields": {
|
||||
"name": "course_experience.enable_course_goals",
|
||||
"everyone": true
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user