testcentricity_web 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98298b1269fe2d4737edcca42ee62cd492821cb1
|
4
|
+
data.tar.gz: d67323c361b7131e2989a7f3cd7ea6672edc1ca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5156b3d332280bd77036acb1a671a4ef981d5eaaea60371b8e091d3a5bd0b5df524082141e1e6873b165d983e45ee97a15b6ff4af8a48c4a3baeddea5568631c
|
7
|
+
data.tar.gz: de20a06d2d0f82da95a66ef10bcb4a808a8f40daaa5a1daeb387d9d49d1926d66d89485f2444cf9d0bbd1dcdf84a0a9ec829b213898efc8e755e796d08d4d0a8
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
1
3
|
module TestCentricity
|
2
4
|
|
3
5
|
XL_PRIMARY_DATA_PATH ||= 'features/test_data/'
|
@@ -23,9 +25,17 @@ module TestCentricity
|
|
23
25
|
end
|
24
26
|
|
25
27
|
|
26
|
-
class
|
28
|
+
class DataSource
|
27
29
|
attr_accessor :current
|
28
30
|
|
31
|
+
def read_yaml_node_data(file_name, node_name)
|
32
|
+
data = YAML.load_file("#{XL_PRIMARY_DATA_PATH}#{file_name}")
|
33
|
+
data[node_name]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
class ExcelDataSource < TestCentricity::DataSource
|
29
39
|
def pick_excel_data_source(sheet, row_name)
|
30
40
|
environment = ENV['TEST_ENVIRONMENT']
|
31
41
|
data_file = "#{XL_PRIMARY_DATA_PATH}#{environment}_data.xls"
|
@@ -4,8 +4,14 @@ module TestCentricity
|
|
4
4
|
|
5
5
|
WKS_ENVIRONS ||= 'Environments'
|
6
6
|
|
7
|
-
def find_environ(
|
8
|
-
|
7
|
+
def find_environ(environ_name, source_type = :excel)
|
8
|
+
case source_type
|
9
|
+
when :excel
|
10
|
+
data = ExcelData.read_row_data(XL_PRIMARY_DATA_FILE, WKS_ENVIRONS, environ_name)
|
11
|
+
when :yaml
|
12
|
+
data = read_yaml_node_data('environments.yml', environ_name)
|
13
|
+
end
|
14
|
+
@current = Environ.new(data)
|
9
15
|
Environ.set_current(@current)
|
10
16
|
end
|
11
17
|
end
|
@@ -162,13 +162,13 @@ module TestCentricity
|
|
162
162
|
|
163
163
|
def open_portal
|
164
164
|
environment = Environ.current
|
165
|
-
|
166
|
-
url = "#{environment.
|
167
|
-
url = "#{environment.base_url}#{environment.append}"
|
168
|
-
if environment.user_id.
|
169
|
-
visit "#{environment.protocol}://#{environment.user_id}:#{environment.password}@#{url}"
|
170
|
-
else
|
165
|
+
environment.hostname.blank? ?
|
166
|
+
url = "#{environment.base_url}#{environment.append}" :
|
167
|
+
url = "#{environment.hostname}/#{environment.base_url}#{environment.append}"
|
168
|
+
if environment.user_id.blank? || environment.password.blank?
|
171
169
|
visit "#{environment.protocol}://#{url}"
|
170
|
+
else
|
171
|
+
visit "#{environment.protocol}://#{environment.user_id}:#{environment.password}@#{url}"
|
172
172
|
end
|
173
173
|
Environ.set_portal_state(:open)
|
174
174
|
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: 0.7.
|
4
|
+
version: 0.7.8
|
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-04-
|
11
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|