testcentricity_web 1.0.19 → 1.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e840ac1cdbf5dabf0e407b4897e07b124d116cb
4
- data.tar.gz: 9e49cae5c16c6a85aae4acb746f9926f20fcd929
3
+ metadata.gz: 4138bec33af343b62212404678aa8a09dc2c149c
4
+ data.tar.gz: 39ee25edd0087cb3a8c94dfc90855d750ce01350
5
5
  SHA512:
6
- metadata.gz: 6c03b13884c74724ee1ffb30aaa73787efe0d3565478cdd0192c022d98d1b823cf2767c7b82df75fabaff47e0f0cc7271091393e679c037fd8c94a412601f968
7
- data.tar.gz: d127c67de4d6c60f961160bf3dd335f2ff06b12141fb7459a96ffb722471f4bc182918c13323ece7ac43ea4188447b831eebbe13723b0e42d22d22d3e51f4e2b
6
+ metadata.gz: 6efa4aac3d78650aa5f41baf2c9e4cac538bf9b502264dac45710e55e641cf7f7b0d87282a6d5b6f96756547f1a94b433727df3416eeff9f60e78fa43aed374c
7
+ data.tar.gz: 28554a7d8148ecf2a84897c82589830f0028f805df7c3aa8cb81b4f0ca3a18c80d1a31d2f2950418d74cf6fc7bcdd1ee6f23408116bdd349c419cd1096ee55bd
data/README.md CHANGED
@@ -120,6 +120,10 @@ The `page_name` trait is registered with the **PageManager** object, which inclu
120
120
  parameter and returns an instance of the associated **Page Object**. If you intend to use the **PageManager**, you must define a `page_name`
121
121
  trait for each of the **Page Objects** to be registered.
122
122
 
123
+ The `page_name` trait is usually a `String` value that represents the name of the page that will be matched by the `PageManager.findpage` method.
124
+ `page_name` traits are case and white-space sensitive. For pages that may be referenced with multiple names, the `page_name` trait may also be
125
+ an `Array` of `String` values representing those page names.
126
+
123
127
  A `page_url` trait should be defined if a page can be directly loaded using a URL. If you set Capybara's `app_host`, or specify a base URL
124
128
  when calling the `WebDriverConnect.initialize_web_driver` method, then your `page_url` trait can be the relative URL slug that will
125
129
  be appended to the base URL specified in `app_host`. Specifying a `page_url` trait is optional, as not all web pages can be directly loaded
@@ -139,7 +143,7 @@ You define your page's **Traits** as shown below:
139
143
 
140
144
 
141
145
  class HomePage < TestCentricity::PageObject
142
- trait(:page_name) { 'Home' }
146
+ trait(:page_name) { ['Home', 'Dashboard'] }
143
147
  trait(:page_url) { '/dashboard' }
144
148
  trait(:page_locator) { 'body.dashboard' }
145
149
  end
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '1.0.19'
2
+ VERSION = '1.0.20'
3
3
  end
@@ -41,11 +41,15 @@ module TestCentricity
41
41
  pages.each do |page_object, page_class|
42
42
  obj = page_class.new
43
43
  @page_objects[page_object] = obj unless @page_objects.has_key?(page_object)
44
- page_key = obj.page_name.gsub(/\s+/, '').downcase.to_sym
45
- if page_key != page_object
46
- @page_objects[page_key] = obj unless @page_objects.has_key?(page_key)
44
+ page_names = obj.page_name
45
+ page_names = Array(page_names) if page_names.is_a? String
46
+ page_names.each do |name|
47
+ page_key = name.gsub(/\s+/, '').downcase.to_sym
48
+ if page_key != page_object
49
+ @page_objects[page_key] = obj unless @page_objects.has_key?(page_key)
50
+ end
51
+ result = "#{result}def #{page_object};@#{page_object} ||= TestCentricity::PageManager.find_page(:#{page_object});end;"
47
52
  end
48
- result = "#{result}def #{page_object};@#{page_object} ||= TestCentricity::PageManager.find_page(:#{page_object});end;"
49
53
  end
50
54
  result
51
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.19
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-23 00:00:00.000000000 Z
11
+ date: 2016-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler