Sha256: 447000b8e273229a7614eeda302f37e4fa79595364acfb74d535e3ddf20fba51

Contents?: true

Size: 894 Bytes

Versions: 28

Compression:

Stored size: 894 Bytes

Contents

require 'integration_puppet_helper'

module ForemanPuppet
  class EnvironmentJSTest < IntegrationTestWithJavascript
    include ForemanPuppet::Engine.routes.url_helpers

    let(:environment) { FactoryBot.create(:environment) }
    setup { environment }

    test 'index page' do
      assert_index_page(environments_path, 'Environments', 'Create Puppet Environment')
    end

    test 'create new page' do
      assert_new_button(environments_path, 'Create Puppet Environment', new_environment_path)
      fill_in 'environment_name', with: 'golive'
      assert_submit_button(environments_path)
      assert page.has_link? 'golive'
    end

    test 'edit page' do
      visit environments_path
      click_link environment.name
      fill_in 'environment_name', with: 'production222'
      assert_submit_button(environments_path)
      assert page.has_link? 'production222'
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
foreman_puppet-4.0.1 test/integration/foreman_puppet/environment_js_test.rb
foreman_puppet-4.0.0 test/integration/foreman_puppet/environment_js_test.rb
foreman_puppet-3.0.6 test/integration/foreman_puppet/environment_js_test.rb
foreman_puppet-3.0.5 test/integration/foreman_puppet/environment_js_test.rb
foreman_puppet-3.0.4 test/integration/foreman_puppet/environment_js_test.rb
foreman_puppet-3.0.3 test/integration/foreman_puppet/environment_js_test.rb
foreman_puppet-3.0.2 test/integration/foreman_puppet/environment_js_test.rb
foreman_puppet-3.0.1 test/integration/foreman_puppet/environment_js_test.rb