'Scenario: User submits valid input to the \'add image\' form
Given I am editing a response on a discussion page
When I click the \'add image\' icon in the editor toolbar
And enter a valid url to the URL input field
And enter a valid string in the Description input field
And click the \'OK\' button
Then the edited response should contain the new image'

@attr(shard=2)
def test_edit_response_add_image(self):

    self.setup_user()
    self.setup_view()
    page = self.create_single_thread_page('response_edit_test_thread')
    page.visit()
    response_id = 'response_self_author'
    url = 'http://www.example.com/something.png'
    description = 'image    from    example.com'
    page.start_response_edit(response_id)
    page.set_response_editor_value(response_id, '')
    page.add_content_via_editor_button('image', response_id, url, description)
    page.submit_response_edit(response_id, '')
    expected_response_html = '<p><img    src="{}"    alt="{}"    title=""></p>'.format(url, description)
    actual_response_html = page.q(css='.response_{}    .response-body'.format(response_id)).html[0]
    self.assertEqual(expected_response_html, actual_response_html)
