Sha256: b1222ab47124389e275f1a783bdefc2a6f8a87ddbee2796052b94b9bc010d851

Contents?: true

Size: 1.48 KB

Versions: 24

Compression:

Stored size: 1.48 KB

Contents

# frozen_string_literal: true

require_relative "../page_object"

module Pages
  module LowClearance
    class ProfilePage < Pages::PageObject
      pattr_initialize :patient

      def add_or_edit
        visit patient_low_clearance_dashboard_path(patient)

        within ".page-actions" do
          click_on "Add"
          click_on "Profile"
        end
      end

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

      def referred_by=(value)
        select value, from: "Referred by"
      end

      def referred_by_notes=(value)
        fill_in "Referred by notes", with: value
      end

      def date_first_seen=(value)
        fill_in "Date first seen", with: value
      end

      def dialysis_plan=(value)
        select value, from: "Dialysis plan"
      end

      def dialysis_plan_date=(value)
        fill_in "Dialysis plan date", with: value
      end

      def predicted_esrf_date=(value)
        fill_in "Predicted ESRF date", with: value
      end

      def referral_cre=(value)
        fill_in "Referral CRE", with: value
      end

      def referral_efgr=(value)
        fill_in "Referral eGFR", with: value
      end

      def education_status=(value)
        select value, from: "Education status"
      end

      def education_type=(value)
        select value, from: "Education type"
      end

      def date_attending=(value)
        fill_in "Date attended educ.", with: value
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

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