Commit 3a06ef47 by Matjaz Gregoric Committed by GitHub

Merge pull request #29 from open-craft/mtyaka/enable-webview

Enable webview for Poll & Survey blocks
parents 1686adc2 a0cba5e1
......@@ -360,6 +360,7 @@ class PollBlock(PollBase):
else:
return None
@XBlock.supports("multi_device") # Mark as mobile-friendly
def student_view(self, context=None):
"""
The primary view of the PollBlock, shown to students
......@@ -582,6 +583,7 @@ class SurveyBlock(PollBase):
choices = Dict(help="The user's answers", scope=Scope.user_state)
event_namespace = 'xblock.survey'
@XBlock.supports("multi_device") # Mark as mobile-friendly
def student_view(self, context=None):
"""
The primary view of the SurveyBlock, shown to students
......
......@@ -78,24 +78,6 @@ class TestPrivateResults(PollBaseTest):
@unpack
@data(*scenarios)
def test_submit_button(self, page_name, names):
self.go_to_page(page_name)
submit = self.get_submit()
self.assertIn('Submit', submit.get_attribute('outerHTML'))
self.make_selections(names)
submit.click()
self.wait_until_clickable(self.browser.find_element_by_css_selector('.poll-voting-thanks'))
self.assertIn('Resubmit', submit.get_attribute('outerHTML'), 'Resubmit')
# This should persist on page reload.
self.go_to_page(page_name)
submit = self.get_submit()
self.assertIn('Resubmit', submit.get_attribute('outerHTML'), 'Resubmit')
@unpack
@data(*scenarios)
def test_feedback_display(self, page_name, names):
self.go_to_page(page_name)
self.assertFalse(self.browser.find_element_by_css_selector('.poll-feedback').is_displayed())
......
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