Sha256: 29b0e9cff3bdfa0eed0ec777ed98574ab803be3f956fd9cb196fedf366994bd9

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

module ARBookFinder
  class UserTypeProcessor
    include Capybara::DSL
    
    USER_TYPE_URL = "#{ARBookFinder::BASE_URL}/usertype.aspx"

    USER_TYPES = {
      student: 'Student',
      parent: 'Parent',
      teacher: 'Teacher',
      librarian: 'Librarian'
    }

    def initialize(user_type)
      @user_type = USER_TYPES[user_type]
    end

    def process
      visit(USER_TYPE_URL)
      choose(@user_type)
      click_button('Submit')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ar_book_finder-1.1.1 lib/ar_book_finder/user_type_processor.rb
ar_book_finder-1.1.0 lib/ar_book_finder/user_type_processor.rb