Sha256: d2a986f7d6096baf769f60520ad7b736103a81529087ccb67ce181af88c31e88

Contents?: true

Size: 929 Bytes

Versions: 22

Compression:

Stored size: 929 Bytes

Contents

# frozen_string_literal: true

require_relative "../page_object"

module Pages
  module Accesses
    class ProfilePage < PageObject
      include CapybaraHelper
      pattr_initialize :patient

      def visit_add
        visit patient_accesses_dashboard_path(patient)
        within(".page-actions") do
          click_on "Add"
          click_on "Access Profile"
        end
      end

      def visit_edit
        visit patient_accesses_dashboard_path(patient)
        within_article "Access Profile History" do
          click_on "Edit"
        end
      end

      def formed_on=(value)
        fill_in "Formed On", with: value
      end

      def access_type=(value)
        select(value, from: "Access Type")
      end

      def side=(value)
        select value, from: "Access Side"
      end

      def save
        within ".top" do
          find('input[name="commit"]').click
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
renalware-core-2.0.153 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.152 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.151 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.149 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.148 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.147 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.146 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.145 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.144 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.143 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.142 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.141 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.140 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.139 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.138 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.137 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.136 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.135 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.134 spec/support/pages/accesses/profile_page.rb
renalware-core-2.0.133 spec/support/pages/accesses/profile_page.rb