Sha256: fdda1d66e984111d36187558f69b4e8c74e463ea013484581cc6cf7e9280ebba

Contents?: true

Size: 1.38 KB

Versions: 8

Compression:

Stored size: 1.38 KB

Contents

module Selectors
  module Header
    def nav_toggle(section, link)
      within '#masthead' do
        click_on section
        click_on link
      end
    end

    def user_notifications_link
      nav_toggle('Dashboard', 'Notifications')
    end

    def user_utility_toggle
      within '#user_utility_links' do
        find '.dropdown-toggle.btn.btn-default'
      end
    end
  end

  module Dashboard
    def db_item_actions_toggle(item)
      within "#document_#{item.id}" do
        find '.dropdown-toggle'
      end
    end
  end

  module NewTransfers
    def new_owner_dropdown
      find '#s2id_proxy_deposit_request_transfer_to'
    end

    def new_owner_search_field
      within '#select2-drop' do
        find '.select2-input'
      end
    end

    def new_owner_search_result
      within '#select2-drop' do
        find '.select2-result-selectable'
      end
    end

    def submit_button
      within '#new_transfer' do
        find 'input[type=submit]'
      end
    end
  end

  module Transfers
    def first_sent_cancel_button
      within '#outgoing-transfers' do
        find '.btn.btn-danger'
      end
    end

    def first_received_accept_dropdown
      within '#incoming-transfers' do
        find '.dropdown-toggle.accept'
      end
    end

    def first_received_reject_button
      within '#incoming-transfers' do
        find '.btn.btn-danger'
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sufia-7.1.0 spec/support/selectors.rb
sufia-7.0.0 spec/support/selectors.rb
sufia-7.0.0.rc2 spec/support/selectors.rb
sufia-7.0.0.rc1 spec/support/selectors.rb
sufia-7.0.0.beta4 spec/support/selectors.rb
sufia-7.0.0.beta3 spec/support/selectors.rb
sufia-7.0.0.beta2 spec/support/selectors.rb
sufia-7.0.0.beta1 spec/support/selectors.rb