Use vulture to find unused bokchoy page objects.
These were all un-used on master.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
"""
|
||||
Find courses page (main page of the LMS).
|
||||
"""
|
||||
|
||||
|
||||
from bok_choy.page_object import PageObject
|
||||
|
||||
from common.test.acceptance.pages.lms import BASE_URL
|
||||
|
||||
|
||||
class FindCoursesPage(PageObject):
|
||||
"""
|
||||
Find courses page (main page of the LMS).
|
||||
"""
|
||||
|
||||
url = BASE_URL
|
||||
|
||||
def is_browser_on_page(self):
|
||||
return "edX" in self.browser.title
|
||||
|
||||
@property
|
||||
def course_id_list(self):
|
||||
"""
|
||||
Retrieve the list of available course IDs
|
||||
on the page.
|
||||
"""
|
||||
|
||||
return self.q(css='article.course').attrs('id')
|
||||
@@ -1347,24 +1347,6 @@ class StudentSpecificAdmin(StudentAdminPage):
|
||||
TASK_HISTORY_TABLE_NAME = "task-history-single-table"
|
||||
|
||||
|
||||
class CourseSpecificAdmin(StudentAdminPage):
|
||||
"""
|
||||
Course specific section of the Student Admin page.
|
||||
"""
|
||||
CONTAINER = ".course-specific-container"
|
||||
|
||||
PROBLEM_INPUT_NAME = "problem-select-all"
|
||||
STUDENT_EMAIL_INPUT_NAME = None
|
||||
|
||||
RESET_ATTEMPTS_BUTTON_NAME = "reset-attempts-all"
|
||||
RESCORE_BUTTON_NAME = "rescore-problem-all"
|
||||
RESCORE_IF_HIGHER_BUTTON_NAME = "rescore-problem-all-if-higher"
|
||||
DELETE_STATE_BUTTON_NAME = None
|
||||
|
||||
BACKGROUND_TASKS_BUTTON_NAME = "task-history-all"
|
||||
TASK_HISTORY_TABLE_NAME = "task-history-all-table"
|
||||
|
||||
|
||||
class EntranceExamAdmin(StudentAdminPage):
|
||||
"""
|
||||
Entrance exam section of the Student Admin page.
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
"""
|
||||
Matlab Problem Page.
|
||||
"""
|
||||
|
||||
|
||||
from bok_choy.page_object import PageObject
|
||||
|
||||
|
||||
class MatlabProblemPage(PageObject):
|
||||
"""
|
||||
View of matlab problem page.
|
||||
"""
|
||||
|
||||
url = None
|
||||
|
||||
def is_browser_on_page(self):
|
||||
return self.q(css='.ungraded-matlab-result').present
|
||||
|
||||
@property
|
||||
def problem_name(self):
|
||||
"""
|
||||
Return the current problem name.
|
||||
"""
|
||||
return self.q(css='.problem-header').text[0]
|
||||
|
||||
def set_response(self, response_str):
|
||||
"""
|
||||
Input a response to the prompt.
|
||||
"""
|
||||
input_css = "$('.CodeMirror')[0].CodeMirror.setValue('{}');".format(response_str)
|
||||
self.browser.execute_script(input_css)
|
||||
|
||||
def click_run_code(self):
|
||||
"""
|
||||
Click the run code button.
|
||||
"""
|
||||
self.q(css='input.save').click()
|
||||
self.wait_for_ajax()
|
||||
|
||||
def get_grader_msg(self, class_name):
|
||||
"""
|
||||
Returns the text value of given class.
|
||||
"""
|
||||
self.wait_for_element_visibility(class_name, 'Grader message is visible')
|
||||
return self.q(css=class_name).text
|
||||
@@ -166,37 +166,3 @@ class FakePaymentPage(PageObject):
|
||||
self.q(css="input[value='Submit']").click()
|
||||
|
||||
return PaymentAndVerificationFlow(self.browser, self._course_id, entry_point='payment-confirmation').wait_for_page()
|
||||
|
||||
|
||||
class FakeSoftwareSecureVerificationPage(PageObject):
|
||||
"""
|
||||
This page is a page used for testing that allows the user to change the status of their most recent
|
||||
verification.
|
||||
"""
|
||||
|
||||
url = BASE_URL + '/verify_student/software-secure-fake-response'
|
||||
|
||||
def is_browser_on_page(self):
|
||||
""" Determine if browser is on the page. """
|
||||
message = self.q(css='BODY').text
|
||||
if not message:
|
||||
return False
|
||||
|
||||
match = re.search('Fake Software Secure page', message[0])
|
||||
return True if match else False
|
||||
|
||||
def mark_approved(self):
|
||||
""" Mark the latest verification attempt as passing. """
|
||||
self.q(css='#btn_pass').click()
|
||||
|
||||
def mark_denied(self):
|
||||
""" Mark the latest verification attempt as denied. """
|
||||
self.q(css='#btn_denied').click()
|
||||
|
||||
def mark_error(self):
|
||||
""" Mark the latest verification attempt as an error. """
|
||||
self.q(css='#btn_error').click()
|
||||
|
||||
def mark_unkown_error(self):
|
||||
""" Mark the latest verification attempt as an unknown error. """
|
||||
self.q(css='#btn_unkonwn_error').click()
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
"""
|
||||
Page that allows the student to grade calibration essays
|
||||
(requirement for being allowed to grade peers).
|
||||
"""
|
||||
|
||||
|
||||
from bok_choy.page_object import PageObject
|
||||
from bok_choy.promise import Promise
|
||||
|
||||
|
||||
class PeerCalibratePage(PageObject):
|
||||
"""
|
||||
Grade calibration essays.
|
||||
"""
|
||||
|
||||
url = None
|
||||
|
||||
def is_browser_on_page(self):
|
||||
|
||||
def _is_correct_page():
|
||||
is_present = (
|
||||
self.q(css='div.peer-grading-tools').present or
|
||||
self.q(css='div.calibration-panel.current-state').present
|
||||
)
|
||||
return is_present, is_present
|
||||
|
||||
return Promise(_is_correct_page, 'On the peer grading calibration page.').fulfill()
|
||||
|
||||
def continue_to_grading(self):
|
||||
"""
|
||||
Continue to peer grading after completing calibration.
|
||||
"""
|
||||
self.q(css='input.calibration-feedback-button').first.click()
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
"""
|
||||
Return a message shown to the user, or None if no message is available.
|
||||
"""
|
||||
messages = self.q(css='div.peer-grading-tools > div.message-container > p').text
|
||||
if len(messages) < 1:
|
||||
return None
|
||||
else:
|
||||
return messages[0]
|
||||
@@ -1,35 +0,0 @@
|
||||
"""
|
||||
Confirmation screen for peer calibration and grading.
|
||||
"""
|
||||
|
||||
|
||||
from bok_choy.page_object import PageObject
|
||||
from bok_choy.promise import Promise
|
||||
|
||||
|
||||
class PeerConfirmPage(PageObject):
|
||||
"""
|
||||
Confirmation for peer calibration and grading.
|
||||
"""
|
||||
|
||||
url = None
|
||||
|
||||
def is_browser_on_page(self):
|
||||
|
||||
def _is_correct_page():
|
||||
is_present = self.q(css='section.calibration-interstitial-page').present
|
||||
return is_present, is_present
|
||||
|
||||
return Promise(_is_correct_page, 'On the confirmation page for peer calibration and grading.').fulfill()
|
||||
|
||||
def start(self, is_calibrating=False):
|
||||
"""
|
||||
Continue to the next section after the confirmation page.
|
||||
If `is_calibrating` is false, try to continue to peer grading.
|
||||
Otherwise, try to continue to calibration grading.
|
||||
"""
|
||||
if is_calibrating:
|
||||
css_selector = 'input.calibration-interstitial-page-button'
|
||||
else:
|
||||
css_selector = 'input.interstitial-page-button'
|
||||
self.q(css=css_selector).first.click()
|
||||
@@ -1,39 +0,0 @@
|
||||
"""
|
||||
Students grade peer submissions.
|
||||
"""
|
||||
|
||||
|
||||
from bok_choy.page_object import PageObject
|
||||
from bok_choy.promise import Promise
|
||||
|
||||
|
||||
class PeerGradePage(PageObject):
|
||||
"""
|
||||
Students grade peer submissions.
|
||||
"""
|
||||
|
||||
url = None
|
||||
|
||||
def is_browser_on_page(self):
|
||||
def _is_correct_page():
|
||||
is_present = (
|
||||
self.q(css='div.peer-grading-tools').present or
|
||||
self.q(css='div.grading-panel.current-state').present
|
||||
)
|
||||
return is_present, is_present
|
||||
|
||||
return Promise(_is_correct_page, 'On the peer grading page.').fulfill()
|
||||
|
||||
@property
|
||||
def problem_list(self):
|
||||
"""
|
||||
Return the list of available problems to peer grade.
|
||||
"""
|
||||
return self.q(css='a.problem-button').text
|
||||
|
||||
def select_problem(self, problem_name):
|
||||
"""
|
||||
Choose the problem with `problem_name` to start grading or calibrating.
|
||||
"""
|
||||
index = self.problem_list.index(problem_name) + 1
|
||||
self.q(css='a.problem-button:nth-of-type({})'.format(index)).first.click()
|
||||
@@ -1,15 +0,0 @@
|
||||
"""
|
||||
Edit Subsection page in Studio
|
||||
"""
|
||||
|
||||
|
||||
from bok_choy.page_object import PageObject
|
||||
|
||||
|
||||
class SubsectionPage(PageObject):
|
||||
"""
|
||||
Edit Subsection page in Studio
|
||||
"""
|
||||
|
||||
def is_browser_on_page(self):
|
||||
return self.q(css='body.view-subsection').present
|
||||
@@ -19,7 +19,7 @@ from ...pages.lms.course_home import CourseHomePage
|
||||
from ...pages.lms.courseware import CoursewarePage, CoursewareSequentialTabPage
|
||||
from ...pages.lms.create_mode import ModeCreationPage
|
||||
from ...pages.lms.dashboard import DashboardPage
|
||||
from ...pages.lms.pay_and_verify import FakePaymentPage, FakeSoftwareSecureVerificationPage, PaymentAndVerificationFlow
|
||||
from ...pages.lms.pay_and_verify import FakePaymentPage, PaymentAndVerificationFlow
|
||||
from ...pages.lms.problem import ProblemPage
|
||||
from ...pages.lms.progress import ProgressPage
|
||||
from ...pages.lms.track_selection import TrackSelectionPage
|
||||
|
||||
Reference in New Issue
Block a user