Unverified Commit 9108182d authored by Steffen van Bergerem's avatar Steffen van Bergerem
Browse files

Fix getting started popovers cuke

parent 8a9ce0d6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ Feature: new user registration
  Scenario: closing a popover clears getting started
    When I confirm the alert after I follow "awesome_button"
    Then I should be on the stream page
    And I have turned off jQuery effects
    And I wait for the popovers to appear
    And I click close on all the popovers
    And I close the publisher
+7 −7
Original line number Diff line number Diff line
@@ -255,16 +255,16 @@ Then 'I press the attached image' do
end

And "I wait for the popovers to appear" do
  page.should have_selector(".popover", count: 3)
  expect(page).to have_selector(".popover", count: 3)
end

And /^I click close on all the popovers$/ do
  page.execute_script("$('.popover .close')[0].click();")
  expect(page).to have_selector(".popover", count: 2)
  page.execute_script("$('.popover .close')[0].click();")
  expect(page).to have_selector(".popover", count: 1)
  page.execute_script("$('.popover .close').click();")
  expect(page).to_not have_selector(".popover .close")
  find(".popover .close", match: :first).click
  expect(page).to have_selector(".popover", count: 2, visible: false)
  find(".popover .close", match: :first).click
  expect(page).to have_selector(".popover", count: 1, visible: false)
  find(".popover .close", match: :first).click
  expect(page).to_not have_selector(".popover", visible: false)
end

Then /^I should see a flash message indicating success$/ do