Ifd_Automation 1.8.0 → 1.9.0

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: 2d5a9ab98f45901972e11b5813ad31d4f7d1abc9
4
- data.tar.gz: 0cd32afb25ebcecf00b74afe4f44d060eb9c2ec9
3
+ metadata.gz: 4381df69057eaaaef5b1dd1f1df45c50672c069c
4
+ data.tar.gz: baae0ae5ab74e608e1e9b8c697f773d5f378e9fe
5
5
  SHA512:
6
- metadata.gz: 8271deb6baa6408bca39c9d854e1b7f72c9dc235314b14fddbca2bf40126866f959d6b03b9e65429e79a9f4fbaa893a434ee9749532243f2c6ebc8f3b4bc95db
7
- data.tar.gz: 171818110ff8bba9b71cbd800eb74a7ba199356b633a1241fa28824bd4d32f77a7bafb7c7fe7f9ef21202a2c965530d7913b87e4a45085a5abbaef44a2c65c6d
6
+ metadata.gz: e97a0cf6713406b8c63df89294fb1a34d5baaee946a07906c1db830edf47667bc0605946ba8a574daa9c4c83a6234563d37c7be4dc4f3158ee4faa1fcfa19ee4
7
+ data.tar.gz: 2b0492b15f4a409006f52af403e7002a4fd4efa8e316e974b3972b22bbf3ff336f4c07543e9c210a2b572e521e5e6d9b06de798652cf633cac47be7ce870e955
@@ -1,6 +1,6 @@
1
1
  Given /^I read data from file "(.*)"$/ do |file_name|
2
2
  @file_data = ""
3
- file_path = $test_data_dir + file_name
3
+ file_path = $test_data_dir + file_name.downcase
4
4
  if File.exist?(file_path)
5
5
  file = File.open(file_path)
6
6
  @file_data += file.read
@@ -10,15 +10,15 @@ Given /^I read data from file "(.*)"$/ do |file_name|
10
10
  end
11
11
  end
12
12
 
13
- Then /^I delete file "(.*)"$/ do |file_name|
14
- file_path = ($test_data_dir + file_name)
15
- if File.exists?(file_path)
16
- File.delete(file_path)
17
- puts "#{file_name} is deleted successfully"
18
- else
19
- puts "File #{file_name} does not exists"
20
- end
21
- end
13
+ # Then /^I delete file "(.*)"$/ do |file_name|
14
+ # file_path = ($test_data_dir + file_name)
15
+ # if File.exists?(file_path)
16
+ # File.delete(file_path)
17
+ # puts "#{file_name} is deleted successfully"
18
+ # else
19
+ # puts "File #{file_name} does not exists"
20
+ # end
21
+ # end
22
22
 
23
23
  When /^show me the params of "(.*)"$/ do |params_name|
24
24
  if $PARAMS["#{params_name.downcase}"]
@@ -1,3 +1,3 @@
1
1
  module IfdAutomation
2
- VERSION = "1.8.0"
2
+ VERSION = "1.9.0"
3
3
  end
@@ -24,8 +24,9 @@ end
24
24
 
25
25
  # Example
26
26
  # When I get SOAP operations list from 'http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl'
27
- When /^I get SOAP operations list from '(.*?)'$/ do |request|
28
- @client = Savon.client(ssl_verify_mode: :none,wsdl: "#{request}")
27
+ When /^I get SOAP operations list from '(.*?)'$/ do |url|
28
+ request_url = URI.encode check_match_url url
29
+ @client = Savon.client(ssl_verify_mode: :none,wsdl: "#{request_url}")
29
30
  p @client.operations
30
31
  end
31
32
 
@@ -12,11 +12,10 @@ def check_match_url url
12
12
  end
13
13
 
14
14
  def resolve_params url
15
- # if url.include? "params="
16
- condition = url.match(/params='([^']*)'/)[0].downcase
15
+ condition = url.match(/params='([^']*)'/)[0]
17
16
  if condition
18
17
  params_name = url.match(/params='([^']*)'/)[1]
19
- params_value = $PARAMS["#{params_name}"]
18
+ params_value = $PARAMS["#{params_name.downcase}"]
20
19
  if params_value
21
20
  url = url.gsub(condition, params_value)
22
21
  else
@@ -25,9 +24,6 @@ def resolve_params url
25
24
 
26
25
  end
27
26
  url
28
- # else
29
- # url
30
- # end
31
27
  end
32
28
 
33
29
  # Bind grabbed values into placeholders in given URL
@@ -36,7 +32,7 @@ end
36
32
  # @return [String] binded URL or original URL if no placeholders
37
33
  def resolve_ws_url url
38
34
  unless @grabbed.nil?
39
- matched = url.match(/grabbed='([^']*)'/)[0].downcase
35
+ matched = url.match(/grabbed='([^']*)'/)[0]
40
36
  @grabbed.each { |key, value| url = url.gsub(matched, %/#{value}/) }
41
37
  end
42
38
  url
@@ -44,7 +40,7 @@ end
44
40
 
45
41
  def resolve_script script
46
42
  unless @stored.nil?
47
- matched = script.match(/stored='([^']*)'/)[0].downcase
43
+ matched = script.match(/stored='([^']*)'/)[0]
48
44
  @stored.each { |key, value| script = script.gsub(matched, %/#{value}/) }
49
45
  end
50
46
  script
@@ -1,6 +1,2 @@
1
- #mym_header.button_login: {xpath_selector: '//*[@class="btn ifd-btn-black"]'}
2
- #mym_header.button_cookie: {xpath_selector: '//*[@id="btn-give-cookie-consent"]'}
3
- #mym_login.textbox_username: {xpath_selector: '//*[@id="login_user"]'}
4
- #mym_login.textbox_password: {xpath_selector: '//*[@id="login_pass"]'}
5
- #mym_login.label_message_error: {xpath_selector: '//*[@class="ifd-message-error"]'}
6
- #mym_login.button_login: {xpath_selector: '//*[@id="wp-submit"]'}
1
+ # Example
2
+ #button_login: {xpath_selector: '//*[@class="btn ifd-btn-black"]'}
@@ -11,19 +11,6 @@ require 'capybara/cucumber'
11
11
  require 'yaml'
12
12
  require 'selenium-webdriver'
13
13
  require 'Ifd_Automation'
14
- # require File.expand_path('../lib/Ifd_Automation/email_steps.rb')
15
- # require File.expand_path('../lib/Ifd_Automation/file_steps.rb')
16
- # require File.expand_path('../lib/Ifd_Automation/ssh_steps.rb')
17
- # require File.expand_path('../lib/Ifd_Automation/database_steps.rb')
18
- # require File.expand_path('../lib/Ifd_Automation/web_steps.rb')
19
- # require File.expand_path('../lib/Ifd_Automation/webservice_steps.rb')
20
- # require File.expand_path('../lib/Ifd_Automation/response.rb')
21
- # require File.expand_path('../lib/Ifd_Automation_support/selenium_sync_issues.rb')
22
- # require File.expand_path('../lib/Ifd_Automation_support/core.rb')
23
- # require File.expand_path('../lib/Ifd_Automation_support/web_steps_helpers.rb')
24
- # require File.expand_path('../lib/Ifd_Automation_support/mail_helpers.rb')
25
- # require File.expand_path('../lib/Ifd_Automation_support/assertion_helpers.rb')
26
- # require File.expand_path('../lib/Ifd_Automation_support/web_service_helpers.rb')
27
14
 
28
15
  $_CFWEB['Default Browser'] = PROJECT_CONFIG['default_browser'].downcase
29
16
  $_CFWEB['Wait Time'] = PROJECT_CONFIG['wait_time']
@@ -1,7 +1,7 @@
1
1
  default_browser: firefox
2
2
  wait_time: 30
3
- test_page_address:
4
- selenium_grid:
3
+ test_page_address: http://google.com.com/
4
+ selenium_grid: 10.5.1.202
5
5
  send_email_username:
6
6
  send_email_password:
7
7
  receive_email_username:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-24 00:00:00.000000000 Z
11
+ date: 2016-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler