Commit fb1d6886 by Robert Raposa Committed by GitHub

Merge pull request #16091 from edx/robrap/LEARNER-2641

LEARNER-2641: Add course goals bokchoy test.
parents fe8f7f55 407a43f8
...@@ -32,6 +32,15 @@ class CourseHomePage(CoursePage): ...@@ -32,6 +32,15 @@ class CourseHomePage(CoursePage):
# TODO: TNL-6546: Remove the following # TODO: TNL-6546: Remove the following
self.course_outline_page = False 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): def click_bookmarks_button(self):
""" Click on Bookmarks button """ """ Click on Bookmarks button """
self.q(css='.bookmarks-list-button').first.click() 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 ...@@ -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 nose.plugins.attrib import attr
from common.test.acceptance.pages.lms.create_mode import ModeCreationPage
from ...fixtures.course import CourseFixture, XBlockFixtureDesc from ...fixtures.course import CourseFixture, XBlockFixtureDesc
from ...pages.lms.bookmarks import BookmarksPage from ...pages.lms.bookmarks import BookmarksPage
from ...pages.lms.course_home import CourseHomePage from ...pages.lms.course_home import CourseHomePage
...@@ -64,8 +66,12 @@ class CourseHomeTest(CourseHomeBaseTest): ...@@ -64,8 +66,12 @@ class CourseHomeTest(CourseHomeBaseTest):
def test_course_home(self): 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() self.course_home_page.visit()
# TODO: TNL-6546: Remove course_outline_page. # TODO: TNL-6546: Remove course_outline_page.
...@@ -75,6 +81,12 @@ class CourseHomeTest(CourseHomeBaseTest): ...@@ -75,6 +81,12 @@ class CourseHomeTest(CourseHomeBaseTest):
# Check that the tab lands on the course home page. # Check that the tab lands on the course home page.
self.assertTrue(self.course_home_page.is_browser_on_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 # Check that the course navigation appears correctly
EXPECTED_SECTIONS = { EXPECTED_SECTIONS = {
'Test Section': ['Test Subsection'], '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