Commit 407a43f8 by Robert Raposa

Add course goals bokchoy test.

LEARNER-2641
parent 2d19136b
......@@ -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'],
......
This source diff could not be displayed because it is too large. You can view the blob instead.
[
{
"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
}
}
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment