Files
edx-platform/common/test/acceptance/pages/lms/problem.py
zia.fazal@arbisoft.com 3d65110383 Removed boy choy acceptance tests
Removed commented code

Fixed broken tests and quality violations

instructor dashboard test fixes

Fixed pep8 quality violation

Removed few remaining non a11y tests

Fixed quality violations

removed edxapp_acceptance setup file
2020-07-13 19:25:57 +05:00

49 lines
1.3 KiB
Python

"""
Problem Page.
"""
from bok_choy.page_object import PageObject
from common.test.acceptance.pages.common.utils import click_css
class ProblemPage(PageObject):
"""
View of problem page.
"""
url = None
CSS_PROBLEM_HEADER = '.problem-header'
status_indicators = {
'correct': ['span.correct'],
'incorrect': ['span.incorrect'],
'unanswered': ['span.unanswered'],
'submitted': ['span.submitted'],
'unsubmitted': ['.unsubmitted']
}
def is_browser_on_page(self):
return self.q(css='.xblock-student_view').present
@property
def problem_name(self):
"""
Return the current problem name.
"""
self.wait_for_element_visibility(self.CSS_PROBLEM_HEADER, 'wait for problem header')
return self.q(css='.problem-header').text[0]
def click_submit(self):
"""
Click the Submit button.
"""
click_css(self, '.problem .submit')
def click_choice(self, choice_value):
"""
Click the choice input(radio, checkbox or option) where value matches `choice_value` in choice group.
"""
self.q(css='div.problem .choicegroup input[value="' + choice_value + '"]').first.click()
self.wait_for_ajax()