Sha256: d72165e1ad9a5aa97757a47ebc140bb415fa5953f497feb9e950d8e0f8b32e94

Contents?: true

Size: 996 Bytes

Versions: 6

Compression:

Stored size: 996 Bytes

Contents

require 'test_helper'

class ModalContentsTest < 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_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

6 entries across 6 versions & 1 rubygems

Version Path
adminpanel-3.1.0 test/features/shared/form/modal_contents_test.rb
adminpanel-3.0.0 test/features/shared/form/modal_contents_test.rb
adminpanel-2.6.1 test/features/shared/form/modal_contents_test.rb
adminpanel-2.6.0 test/features/shared/form/modal_contents_test.rb
adminpanel-2.5.5 test/features/shared/form/modal_contents_test.rb
adminpanel-2.5.4 test/features/shared/form/modal_contents_test.rb