Sha256: b7fdd202902d18584ba27585b7040e600af4fd038e248681efe032cfce8ec056

Contents?: true

Size: 1.82 KB

Versions: 16

Compression:

Stored size: 1.82 KB

Contents

require 'capybara/cucumber'
require 'rspec/expectations'
require 'test/unit'
require 'testcentricity_web/browser_helper'
require 'testcentricity_web/data_objects_helper'
require 'testcentricity_web/drag_drop_helper'
require 'testcentricity_web/excel_helper'
require 'testcentricity_web/exception_queue_helper'
require 'testcentricity_web/page_objects_helper'
require 'testcentricity_web/page_sections_helper'
require 'testcentricity_web/siebel_open_ui_helper'
require 'testcentricity_web/ui_elements_helper'
require 'testcentricity_web/utility_helpers'
require 'testcentricity_web/environment'
require 'testcentricity_web/webdriver_helper'
require 'testcentricity_web/version'


module TestCentricity
  class PageManager
    attr_accessor :current_page

    @page_objects = {}

    def self.register_page_object(page_ref, page_object)
      @page_objects[page_ref] = page_object unless @page_objects.has_key?(page_ref)
      page_key = page_object.page_name.gsub(/\s+/, "").downcase.to_sym
      if page_key != page_ref
        @page_objects[page_key] = page_object unless @page_objects.has_key?(page_key)
      end
    end

    def self.loaded?
      not @page_objects.empty?
    end

    def self.pages
      @page_objects
    end

    def self.find_page(page_name)
      (page_name.is_a? String) ? page_id = page_name.gsub(/\s+/, "").downcase.to_sym : page_id = page_name
      @page_objects[page_id]
    end

    def self.current_page
      @current_page
    end

    def self.set_current_page(page)
      @current_page = page
    end
  end


  class DataManager
    @data_objects = {}

    def self.register_data_object(data_type, data_class)
      @data_objects[data_type] = data_class unless @data_objects.has_key?(data_type)
    end

    def self.loaded?
      not @data_objects.empty?
    end

    def self.data_objects
      @data_objects
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
testcentricity_web-0.5.4 lib/testcentricity_web.rb
testcentricity_web-0.5.3 lib/testcentricity_web.rb
testcentricity_web-0.5.2 lib/testcentricity_web.rb
testcentricity_web-0.5.1 lib/testcentricity_web.rb
testcentricity_web-0.5.0 lib/testcentricity_web.rb
testcentricity_web-0.4.9 lib/testcentricity_web.rb
testcentricity_web-0.4.8 lib/testcentricity_web.rb
testcentricity_web-0.4.7 lib/testcentricity_web.rb
testcentricity_web-0.4.6 lib/testcentricity_web.rb
testcentricity_web-0.4.5 lib/testcentricity_web.rb
testcentricity_web-0.4.4 lib/testcentricity_web.rb
testcentricity_web-0.4.3 lib/testcentricity_web.rb
testcentricity_web-0.4.2 lib/testcentricity_web.rb
testcentricity_web-0.4.1 lib/testcentricity_web.rb
testcentricity_web-0.4.0 lib/testcentricity_web.rb
testcentricity_web-0.3.9 lib/testcentricity_web.rb