Merge pull request #7382 from edx/mattdrayer/SOL-461
mattdrayer/SOL-461: Student dashboard clean-up
This commit is contained in:
@@ -45,11 +45,9 @@ class DashboardPage(PageObject):
|
||||
Return list of the names of available courses (e.g. "999 edX Demonstration Course")
|
||||
"""
|
||||
def _get_course_name(el):
|
||||
# The first component in the link text is the course number
|
||||
_, course_name = el.text.split(' ', 1)
|
||||
return course_name
|
||||
return el.text
|
||||
|
||||
return self.q(css='section.info > hgroup > h3 > a').map(_get_course_name).results
|
||||
return self.q(css='h3.course-title > a').map(_get_course_name).results
|
||||
|
||||
@property
|
||||
def full_name(self):
|
||||
@@ -64,7 +62,7 @@ class DashboardPage(PageObject):
|
||||
@property
|
||||
def username(self):
|
||||
"""Return the displayed value for the user's username"""
|
||||
return self.q(css='.user-name').text[0]
|
||||
return self.q(css='.username-label').text[0]
|
||||
|
||||
def get_enrollment_mode(self, course_name):
|
||||
"""Get the enrollment mode for a given course on the dashboard.
|
||||
@@ -113,7 +111,7 @@ class DashboardPage(PageObject):
|
||||
el = course_listing[0]
|
||||
|
||||
# Expand the upsell copy and click the upgrade button
|
||||
el.find_element_by_css_selector('.message-upsell').click()
|
||||
el.find_element_by_css_selector('.message-upsell .ui-toggle-expansion').click()
|
||||
el.find_element_by_css_selector('#upgrade-to-verified').click()
|
||||
|
||||
upgrade_page.wait_for_page()
|
||||
@@ -176,4 +174,4 @@ class DashboardPage(PageObject):
|
||||
"""
|
||||
Verify if pre-requisite course messages are being displayed.
|
||||
"""
|
||||
return self.q(css='section.prerequisites > .tip').visible
|
||||
return self.q(css='li.prerequisites > .tip').visible
|
||||
|
||||
Reference in New Issue
Block a user