Sha256: f55bf3abd27bd94cace41bae6d7175c21ada70b61e5d816a7f5bcc61adf96e7e

Contents?: true

Size: 1010 Bytes

Versions: 10

Compression:

Stored size: 1010 Bytes

Contents

require 'test_helper'

class RemoteResourceModalTest < ViewCase
  fixtures :all

  setup :visit_adminpanel_new_user

  def test_modals_exclude_belongs_to_remote_resources
    visit adminpanel.new_user_path
    # test in belongs_to request
    trigger_modal 'Agregar Rol'
    assert_no_link 'Agregar Permisos'
  end

  def test_modals_exclude_has_many_remote_resources
    # test has_many
    visit adminpanel.new_role_path
    trigger_modal 'Agregar Permisos'
    assert_no_link 'Agregar Rol'
  end

  def test_modals_exclude_file_input
    # test file_field and non file field
    visit adminpanel.new_role_path
    trigger_modal 'Agregar Permisos'
    assert_no_link 'Agregar Rol'
  end

  def test_modals_exclude_exclude_add_images_button
    # test file_field and non file field
    visit adminpanel.new_salesman_path
    trigger_modal 'Agregar Producto'
    assert_no_selector '#add-image-link'
  end

  private
    def visit_adminpanel_new_user
      visit adminpanel.signin_path
      login
    end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
adminpanel-2.5.3 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.5.2 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.5.1 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.5.0 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.4.3 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.4.2 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.4.1 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.4.0 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.3.1 test/features/shared/form/remote_resource_modal_test.rb
adminpanel-2.3.0 test/features/shared/form/remote_resource_modal_test.rb