'Scenario: Editing an XBlock should show me a preview even if previews are hidden.
Given that I have a library in Studio with 40 XBlocks
Then previews are visible
And when I click the toggle previews button
Then the previews will not be visible
And when I edit the first XBlock
Then the first XBlock will show a preview
And the other XBlocks will still be placeholders'

def test_edit_with_preview(self):

    self.assertTrue(self.lib_page.are_previews_showing())
    self.lib_page.toggle_previews()
    self.assertFalse(self.lib_page.are_previews_showing())
    target = self.lib_page.xblocks[0]
    target.edit()
    target.save_settings()
    self.assertFalse(target.is_placeholder())
    self.assertTrue(all([xblock.is_placeholder() for xblock in self.lib_page.xblocks[1:]]))
