'Scenario: After unlocking a unit with release date in the past, it is visible to both students and staff
Given I have a published unlocked unit with release date in the past
When I go to the unit page in Studio
And when I deselect "Hide from students"
Then the unit does have a warning that it is visible to students
And when I click on the View Live Button
Then I see the content in the unit when logged in as staff
And when I view the course as a student
Then I see the content in the unit'

def test_unlocked_visible_to_all(self):

    unit = self.go_to_unit_page('Section    With    Locked    Unit', 'Subsection    With    Locked    Unit', 'Locked    Unit')
    checked = unit.toggle_staff_lock()
    self.assertFalse(checked)
    unit.verify_publish_title(self.PUBLISHED_LIVE_STATUS)
    self.assertTrue(unit.currently_visible_to_students)
    self._view_published_version(unit)
    self._verify_components_visible(['discussion'])
    self._verify_student_view_visible(['discussion'])
