'Scenario: Two discussion xblocks in one unit shouldn\'t override their actions
Given that I\'m on a courseware page where there are two inline discussion
When I click on the first discussion block\'s new post button
Then I should be shown only the new post form for the first block
When I click on the second discussion block\'s new post button
Then I should be shown both new post forms
When I cancel the first form
Then I should be shown only the new post form for the second block
When I cancel the second form
And I click on the first discussion block\'s new post button
Then I should be shown only the new post form for the first block
When I cancel the first form
Then I should be shown none of the forms'

def test_dual_discussion_xblock(self):

    self.discussion_page.wait_for_page()
    self.additional_discussion_page.wait_for_page()
    self.discussion_page.expand_discussion()
    self.discussion_page.click_new_post_button()
    self.assertIsNotNone(self.discussion_page.new_post_form)
    self.assertIsNone(self.additional_discussion_page.new_post_form)
    self.additional_discussion_page.expand_discussion()
    self.additional_discussion_page.click_new_post_button()
    self.assertIsNotNone(self.discussion_page.new_post_form)
    self.assertIsNotNone(self.additional_discussion_page.new_post_form)
    self.discussion_page.click_cancel_new_post()
    self.assertIsNone(self.discussion_page.new_post_form)
    self.assertIsNotNone(self.additional_discussion_page.new_post_form)
    self.additional_discussion_page.click_cancel_new_post()
    self.discussion_page.click_new_post_button()
    self.assertIsNotNone(self.discussion_page.new_post_form)
    self.assertIsNone(self.additional_discussion_page.new_post_form)
    self.discussion_page.click_cancel_new_post()
    self.assertIsNone(self.discussion_page.new_post_form)
    self.assertIsNone(self.additional_discussion_page.new_post_form)
