'Scenario: Editing a component and then canceling does not create a draft version (TNL-399)
Given I have a published unit with no unpublished changes
When I go to the unit page in Studio
And edit the content of an HTML component and then press cancel
Then the content does not change
And the title in the Publish information box is "Published and Live"
And when I reload the page
Then the title in the Publish information box is "Published and Live"'

def test_cancel_does_not_create_draft(self):

    unit = self.go_to_unit_page()
    component = unit.xblocks[1]
    component.edit()
    HtmlXBlockEditorView(self.browser, component.locator).set_content_and_cancel('modified    content')
    self.assertEqual(component.student_content, 'Body    of    HTML    Unit.')
    unit.verify_publish_title(self.PUBLISHED_LIVE_STATUS)
    self.browser.refresh()
    unit.wait_for_page()
    unit.verify_publish_title(self.PUBLISHED_LIVE_STATUS)
