Ifd_Automation 1.2.0 → 1.3.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: 991d0f84211f38d2a0e5e8d58ad9bad2e4a0368f
4
- data.tar.gz: e4eaf58e44e4074503f1cd9c53b12882d4fa311a
3
+ metadata.gz: c92ba397105402f096b40f2a241b7739044e5640
4
+ data.tar.gz: 22d696e75b739931baee054ed05dd943a618d5b2
5
5
  SHA512:
6
- metadata.gz: d36ed1b78fc55515acbf207f4f8806759219da12ad6e94d3c21d4a17a9122a06d9956d2215cd205652d3b53a26bc559ed8341549e659853b6571a04a94d6b0bb
7
- data.tar.gz: cbdc4748c7e5efb21416136d09eafd5c62ede213d469c4d1dc9a64346813a68987d0a9c23c596894b3f4cddf8041cfd8da1b0393e93241146b969e4f87c41238
6
+ metadata.gz: 93e8b9c6afa0b255c1679d092abcbefa037c2e3eb43860bc220c916ae99874ddc08a40484cbfe4e1fe4391effd5f7ab24c0636e0d58b7099d9de55e85b4e3737
7
+ data.tar.gz: 6e91b9f3740b4e567374c667e4e3efd62be73833ee8af990c4c4f52d5c7b10dcf18b97a1d2475e6af5e53ca6b4ca66b12d02a36b3122396435d6d21973a1fe90
@@ -13,7 +13,6 @@ end
13
13
 
14
14
  # Find object by Xpath
15
15
  def find_object string_object
16
- object = YAML.load_file("#{File.expand_path(File.dirname(__FILE__) + '/..')}/step_definitions/repositories/project_object.yml")
17
16
  startTime = Time.new.to_i
18
17
  string_object = string_object.gsub(/"/, "'")
19
18
  # puts "String_object: #{string_object}"
@@ -28,7 +27,7 @@ def find_object string_object
28
27
  end
29
28
 
30
29
  # put_log "\n---dyn_pros: #{dyn_pros}"
31
- hash_object = object[string_object]
30
+ hash_object = $OBJECT[string_object]
32
31
  if hash_object == nil
33
32
  put_log ">>> OBJECT NAME MAYBE NOT FOUND!!!"
34
33
  # true.should eq false
@@ -344,9 +343,8 @@ end
344
343
 
345
344
  def data(name)
346
345
  require 'yaml'
347
- globalData = YAML.load_file("#{$test_data_dir}/globalData.yml")
348
346
  begin
349
- return globalData["#{name}"]
347
+ return $globalData["#{name}"]
350
348
  rescue Exception
351
349
  return name
352
350
  end
@@ -1,4 +1,4 @@
1
- require 'rest-client'
1
+ # require 'rest-client'
2
2
  class WebServiceMethods
3
3
 
4
4
  def self.get_response_code(url, timeout)
@@ -1,5 +1,5 @@
1
1
  module Ifd
2
2
  module Automation
3
- VERSION = '1.2.0'
3
+ VERSION = '1.3.0'
4
4
  end
5
5
  end
@@ -1,3 +1,2 @@
1
- #################### TEST DATA FOR LOGIN ACCOUNT
2
- username: anh.pham@infodation.vn
3
- password: anhanh
1
+ username: demo
2
+ password: demo
@@ -3,4 +3,4 @@
3
3
  @LOGIN
4
4
  Feature: Testing login functionality
5
5
  Scenario: Test Case for Demo
6
- Given I navigate to Demo page
6
+ * I login on Admin GUI page with username and password in test data file
@@ -1,3 +1,8 @@
1
- When /I navigate to Demo page/ do
1
+ When /^I login on Admin GUI page with (.*) and (.*) in test data file$/ do |username, password|
2
+ step %{I wait for 5 seconds}
2
3
  step %{I am on Login Page}
3
- end
4
+ step %{I set text on "cif_admin_login.textbox_username" with "#{data(username)}"}
5
+ step %{I set text on "cif_admin_login.textbox_password" with "#{data(password)}"}
6
+ step %{I click on "cif_admin_login.button_login"}
7
+ step %{I wait for 5 seconds}
8
+ end
@@ -1 +1,4 @@
1
- textbox_username: {xpath_selector: '//*[@id="login_user"]'}
1
+ cif_admin_login.textbox_username: {xpath_selector: '//*[@id="UserName"]'}
2
+ cif_admin_login.textbox_password: {xpath_selector: '//*[@id="Password"]'}
3
+ cif_admin_login.button_login: {xpath_selector: '//*[@class="btn btn-primary"]'}
4
+ cif_login.label_message_error: {xpath_selector: '//form/div/fieldset/div[2]'}
@@ -6,8 +6,9 @@ $test_data_dir = $base_dir + '/features/TestData/'
6
6
  $sql_dir = $base_dir + '/features/TestData/SqlScript/'
7
7
  $_CFWEB['Download Dir'] = "#{$test_data_dir}DownloadFolder/"
8
8
  $_CFWEB['Expected Data Dir'] = "#{$test_data_dir}/ExpectedDataFile/"
9
- # $globalData = YAML.load_file("#{$test_data_dir}/globalData.yml")
9
+ $globalData = YAML.load_file("#{$test_data_dir}/globalData.yml")
10
10
  PROJECT_CONFIG = YAML.load_file("#{$current_dir}/project_config.yml")
11
+ $OBJECT = YAML.load_file("#{$base_dir}/features/step_definitions/repositories/project_config.yml")
11
12
 
12
13
  STDOUT.sync = true
13
14
  # require "#{$current_dir}/project_env.rb"
@@ -8,7 +8,7 @@
8
8
  #---------------------------
9
9
  default_browser: :chrome
10
10
  wait_time: 30
11
- test_page_address: http://google.com
11
+ test_page_address: http://10.5.1.200:55602/
12
12
  selenium_grid: http://10.5.1.202:5555/wd/hub
13
13
  ###################################################################
14
14
  # DATABASE CONFIGURATION #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham