Sha256: 1c0093069e24dd30c182a237b610aa34197158892c9dccb11199175a82dbc891

Contents?: true

Size: 1.57 KB

Versions: 17

Compression:

Stored size: 1.57 KB

Contents

module NotifierHelper
  def fill_in_email_notifier
    fill_in "notifiers[Email][to]",     :with => "quentin@example.com"
    fill_in "notifiers[Email][from]",   :with => "ci@example.com"
    fill_in "notifiers[Email][user]",   :with => "inspector"
    fill_in "notifiers[Email][pass]",   :with => "gadget"
    fill_in "notifiers[Email][auth]",   :with => "simple"
    fill_in "notifiers[Email][domain]", :with => "example.com"
  end

  def fill_in_project_info(name, repo)
    fill_in "Name",            :with => name
    fill_in "Git repository",  :with => repo
    fill_in "Branch to track", :with => "master"
    fill_in "Build script",    :with => "rake"
    check   "Public project"

    fill_in_email_notifier
  end

  def assert_have_email_notifier
    assert_have_tag "input#email_notifier_to[@value='quentin@example.com']"
    assert_have_tag "input#email_notifier_from[@value='ci@example.com']"
    assert_have_tag "input#email_notifier_user[@value='inspector']"
    assert_have_tag "input#email_notifier_pass[@value='gadget']"
    assert_have_tag "input#email_notifier_auth[@value='simple']"
    assert_have_tag "input#email_notifier_domain[@value='example.com']"
  end

  def add_project(name, repo)
    visit "/new"
    fill_in_project_info(name, repo)
    click_button "Create Project"

    assert_have_tag("h1", :content => name)
    click_link 'Edit Project'
    assert_have_email_notifier
  end

  def edit_project(name)
    visit "/#{name}"
    click_link "Edit Project"
    assert_have_email_notifier
    fill_in :branch, :with => "testing"
    click_button "Update Project"
  end
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
alphasights-integrity-0.1.10 test/helpers/acceptance/notifier_helper.rb
alphasights-integrity-0.1.9.3 test/helpers/acceptance/notifier_helper.rb
alphasights-integrity-0.1.9.4 test/helpers/acceptance/notifier_helper.rb
alphasights-integrity-0.1.9.5 test/helpers/acceptance/notifier_helper.rb
alphasights-integrity-0.1.9.6 test/helpers/acceptance/notifier_helper.rb
alphasights-integrity-0.1.9.7 test/helpers/acceptance/notifier_helper.rb
alphasights-integrity-0.1.9.8 test/helpers/acceptance/notifier_helper.rb
foca-integrity-0.1.9.3 test/helpers/acceptance/notifier_helper.rb
gforces-integrity-0.1.9.3 test/helpers/acceptance/notifier_helper.rb
gforces-integrity-0.1.9.4 test/helpers/acceptance/notifier_helper.rb
imbriaco-integrity-0.1.9.2.1 test/helpers/acceptance/notifier_helper.rb
imbriaco-integrity-0.1.9.2 test/helpers/acceptance/notifier_helper.rb
integrity-integrity-0.1.10 test/helpers/acceptance/notifier_helper.rb
integrity-integrity-0.1.9.3 test/helpers/acceptance/notifier_helper.rb
integrity-0.1.11 test/helpers/acceptance/notifier_helper.rb
integrity-0.1.10 test/helpers/acceptance/notifier_helper.rb
integrity-0.1.9.3 test/helpers/acceptance/notifier_helper.rb