ole-qa-framework 3.7.0 → 3.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzA3Y2JhZjVjNWUwMzlhOWU0ODhmMmUzYWYyZTdiYzQ5MDE5MzZjOA==
4
+ YWJhMDhkZTQwNGM5ZTQxMDY2MTM4MWQ0MDQzYTNjYzE3ZTM3YjgyZA==
5
5
  data.tar.gz: !binary |-
6
- ZTczNDk2NTkxOWI1Yzc5ZjE5NWQxOTQ0YTk2Njk0YmY1ZTg4Y2QyZA==
6
+ OGVjZmE4MjUzNjVmZDk5MmMyOTI0M2RiZTM2ZDViZWFhNjhlN2NkMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTBhZThhMWI5ZTRjN2RkYjYyOWFlNDljN2RlZDI3Y2VjZTMwM2ZlYzNiZGY1
10
- NWU0ZWZiZmE1YTIzMzFjZGQyNDZiZWIzOTAwYTZhNjllMTg5NzNmZjIzYWY3
11
- MDliZjUwZjFlNmRkNzhiZDA4NjBiM2E4ODY5M2M2MjJkMWMwNWI=
9
+ MDE1ODg5M2VmZTE2ZjZkYmZhYzEyMWVmMzZmZmUwZDcwNTA4ZDM1NDAzNGY5
10
+ MDg2MWZlNzBhZTY2N2QwYzgxYzU1YTc2NmI2ODQ0ZWI1YjU5ZWQzOGU2ODM2
11
+ NzAyODRmMGU3ZDIxMjg2NWI2MzRiZWU0MjRkZTY4YzFiZDJhYzQ=
12
12
  data.tar.gz: !binary |-
13
- Y2QyMjkyMmI2ODRlY2RjNGEwZWM5NWE2ZDE0NzkyN2RlZDIxMjAzYTk2OGMw
14
- ZmI0ZGU3MWYwYjYzMzNlY2RhYWVmNTU2ZjkwMDQwMDRmZDExZTcyYzQwYmU4
15
- OGNjY2NlYWM0MzZlYWQ4ZTE5OGI1OGJkYzFhZTZmYjU2NTZiNmQ=
13
+ YjdjYmY0ZTRkZjlkZWYyZmI4ZjNmZjU1MTE1NGMxNWI0OWFhYjBjYTA0MmYy
14
+ ODk4YjQzNjVlNjg2Yjg0NjJmODhjMjI1MTE0ZjMwNWYxZDNkMWZkMzY4NGIw
15
+ NzQzYmYwYmEwNDllZmY0MzFhYmVmMzc2YTYzZTNmMWY1NDhjMmY=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### v3.7.1 - 2013/12/18
2
+
3
+ * Location Lookup
4
+ * Added return_by_results function.
5
+ * Location Factory
6
+ * Added .new_location method.
7
+
1
8
  ### v3.7.0 - 2013/12/18
2
9
 
3
10
  * Location Pages
@@ -27,7 +27,20 @@ module OLE_QA::Framework
27
27
  str_out.upcase
28
28
  end
29
29
  alias_method(:new_location_code,:location_code)
30
-
30
+
31
+ # Create a new location as a hash.
32
+ # @param [String] level Set the location's level. (Optional, defaults to 1.)
33
+ # @param [String] parent The parent location code. (Optional, defaults to none.)
34
+ def new_location(level = 1, parent = '')
35
+ hash = Hash.new
36
+ hash[:code] = location_code
37
+ hash[:name] = name_builder(sampler(6..8))
38
+ hash[:description] = name_builder(sampler(8..12))
39
+ hash[:level] = level.to_s
40
+ hash[:parent] = parent unless parent.empty?
41
+ hash
42
+ end
43
+
31
44
  end
32
45
  end
33
46
  end
@@ -15,6 +15,6 @@
15
15
  module OLE_QA
16
16
  module Framework
17
17
  # The version number for this project.
18
- VERSION = '3.7.0'
18
+ VERSION = '3.7.1'
19
19
  end
20
20
  end
@@ -42,6 +42,9 @@ module OLE_QA::Framework::OLELS
42
42
  function(:edit_by_text) {|which| b.a(:xpath => "//td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/fieldset/div/div/a[contains(text(),'edit')]")}
43
43
  # Return the 'copy' link for a search results line containing the given text.
44
44
  function(:copy_by_text) {|which| b.a(:xpath => "//td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/fieldset/div/div/a[contains(text(),'copy')]")}
45
+ # Return the 'return results' link for a search results line containing the given text.
46
+ # @note Used when the lookup screen is opened from another page, like the create/edit location page.
47
+ function(:return_by_text) {|which| b.a(:xpath => "//td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/fieldset/div/div/a[contains(text(),'return results')]")}
45
48
  end
46
49
 
47
50
  def wait_for_elements
@@ -11,4 +11,20 @@ describe 'The Metadata Factory' do
11
11
  location.should =~ /\d/
12
12
  end
13
13
 
14
+ it 'should create a randomized location' do
15
+ location = OLE_QA::Framework::Metadata_Factory.new_location
16
+ location.should be_a(Hash)
17
+ location[:code].should be_a(String)
18
+ location[:name].should be_a(String)
19
+ location[:description].should be_a(String)
20
+ location[:level].should eq('1')
21
+ location[:parent].should be_nil
22
+ end
23
+
24
+ it 'should create a location with a level of 2 and a random parent' do
25
+ location = OLE_QA::Framework::Metadata_Factory.new_location(2, OLE_QA::Framework::String_Factory.alpha(3))
26
+ location[:level].should eq('2')
27
+ location[:parent].should =~ /[A-Z]{3}/
28
+ end
29
+
14
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ole-qa-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jain Waldrip