Commit 02a233b7 by Greg Price

Rename URL_PATH to url_path in acceptance code

It's not a constant, and some subclasses will want to make it a
function with @property.
parent a41bdb46
......@@ -11,7 +11,7 @@ class CourseAboutPage(CoursePage):
Course about page (with registration button)
"""
URL_PATH = "about"
url_path = "about"
def is_browser_on_page(self):
return self.is_css_present('section.course-info')
......
......@@ -10,7 +10,7 @@ class CourseInfoPage(CoursePage):
Course info.
"""
URL_PATH = "info"
url_path = "info"
def is_browser_on_page(self):
return self.is_css_present('section.updates')
......
......@@ -13,7 +13,7 @@ class CoursePage(PageObject):
# Overridden by subclasses to provide the relative path within the course
# Paths should not include the leading forward slash.
URL_PATH = ""
url_path = ""
def __init__(self, browser, course_id):
"""
......@@ -28,4 +28,4 @@ class CoursePage(PageObject):
"""
Construct a URL to the page within the course.
"""
return BASE_URL + "/courses/" + self.course_id + "/" + self.URL_PATH
return BASE_URL + "/courses/" + self.course_id + "/" + self.url_path
......@@ -10,7 +10,7 @@ class ProgressPage(CoursePage):
Student progress page.
"""
URL_PATH = "progress"
url_path = "progress"
def is_browser_on_page(self):
has_course_info = self.is_css_present('div.course-info')
......
......@@ -10,7 +10,7 @@ class AssetIndexPage(CoursePage):
The Files and Uploads page for a course in Studio
"""
URL_PATH = "assets"
url_path = "assets"
def is_browser_on_page(self):
return self.is_css_present('body.view-uploads')
......@@ -10,7 +10,7 @@ class ChecklistsPage(CoursePage):
Course Checklists page.
"""
URL_PATH = "checklists"
url_path = "checklists"
def is_browser_on_page(self):
return self.is_css_present('body.view-checklists')
......@@ -10,7 +10,7 @@ class ImportPage(CoursePage):
Course Import page.
"""
URL_PATH = "import"
url_path = "import"
def is_browser_on_page(self):
return self.is_css_present('body.view-import')
......@@ -10,7 +10,7 @@ class CourseUpdatesPage(CoursePage):
Course Updates page.
"""
URL_PATH = "course_info"
url_path = "course_info"
def is_browser_on_page(self):
return self.is_css_present('body.view-updates')
......@@ -13,7 +13,7 @@ class CoursePage(PageObject):
# Overridden by subclasses to provide the relative path within the course
# Does not need to include the leading forward or trailing slash
URL_PATH = ""
url_path = ""
def __init__(self, browser, course_org, course_num, course_run):
"""
......@@ -35,7 +35,7 @@ class CoursePage(PageObject):
Construct a URL to the page within the course.
"""
return "/".join([
BASE_URL, self.URL_PATH,
BASE_URL, self.url_path,
"{course_org}.{course_num}.{course_run}".format(**self.course_info),
"branch", "draft", "block", self.course_info['course_run']
])
......@@ -10,7 +10,7 @@ class StaticPagesPage(CoursePage):
Static Pages page for a course.
"""
URL_PATH = "tabs"
url_path = "tabs"
def is_browser_on_page(self):
return self.is_css_present('body.view-static-pages')
......@@ -10,7 +10,7 @@ class ExportPage(CoursePage):
Course Export page.
"""
URL_PATH = "export"
url_path = "export"
def is_browser_on_page(self):
return self.is_css_present('body.view-export')
......@@ -10,7 +10,7 @@ class CourseTeamPage(CoursePage):
Course Team page in Studio.
"""
URL_PATH = "course_team"
url_path = "course_team"
def is_browser_on_page(self):
return self.is_css_present('body.view-team')
......@@ -10,7 +10,7 @@ class CourseOutlinePage(CoursePage):
Course Outline page in Studio.
"""
URL_PATH = "course"
url_path = "course"
def is_browser_on_page(self):
return self.is_css_present('body.view-outline')
......@@ -10,7 +10,7 @@ class SettingsPage(CoursePage):
Course Schedule and Details Settings page.
"""
URL_PATH = "settings/details"
url_path = "settings/details"
def is_browser_on_page(self):
return self.is_css_present('body.view-settings')
......@@ -10,7 +10,7 @@ class AdvancedSettingsPage(CoursePage):
Course Advanced Settings page.
"""
URL_PATH = "settings/advanced"
url_path = "settings/advanced"
def is_browser_on_page(self):
return self.is_css_present('body.advanced')
......@@ -10,7 +10,7 @@ class GradingPage(CoursePage):
Course Grading Settings page.
"""
URL_PATH = "settings/grading"
url_path = "settings/grading"
def is_browser_on_page(self):
return self.is_css_present('body.grading')
......@@ -10,7 +10,7 @@ class TextbooksPage(CoursePage):
Course Textbooks page.
"""
URL_PATH = "textbooks"
url_path = "textbooks"
def is_browser_on_page(self):
return self.is_css_present('body.view-textbooks')
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