bucky-core 0.9.23 → 0.10.1

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: 10b14f914718bee327d370a016824ae65fab6715
4
- data.tar.gz: aa60dc33c68c89ec59f0fda188d72e26afec56f7
3
+ metadata.gz: 254fcca4cc4661ca3a1e2f458bba3435c170cbc4
4
+ data.tar.gz: 91eb0463910555b1dee2ec93f932e4557782c560
5
5
  SHA512:
6
- metadata.gz: 8c6e20124657ea921cc06bb6cf3046f4b8447c7d5d98b10570a4dbba02dde811fb0cb22059ec74cb7ced2115a0efad5f0ead8093910d321382357b8e3760f5ca
7
- data.tar.gz: c187982034b6da9c85b53f490cde22a32a9d6a79894c47dc470af8b3bdc3bd59ab9f35948a6aba3f754f658d463007dbc3021e87b3278d0c42463e04754b1e4f
6
+ metadata.gz: 073f81e07d824613ef9aedf9440ef2498b51452c21b41a1d8e75b26f1ec46bf74bc1d702eed40b67e1f7e97a46697158c925d0596ac713f0ba2337b140203fa8
7
+ data.tar.gz: 763a2d342173396d824142b41fe37821a6e2d797de38fea437480c83afa68dcc089e903653c455a5cab571348a7b0175f7fe6bbf70ab1b585bb9341ff0af9b93
data/.dockerignore CHANGED
@@ -13,6 +13,7 @@
13
13
  spec/
14
14
  .rspec
15
15
  system-testing/
16
+ docker/
16
17
 
17
18
  # Log
18
19
  *.log
@@ -22,8 +23,8 @@ system-testing/
22
23
  .bundle
23
24
  .vscode
24
25
  .yardoc
25
- _docker
26
26
  coverage/
27
+ example/
27
28
  doc
28
29
  tags
29
30
  tmp
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bucky-core (0.9.21)
4
+ bucky-core (0.9.23)
5
5
  addressable (~> 2.5)
6
6
  color_echo (~> 3.1)
7
7
  json (~> 2.1)
@@ -34,7 +34,7 @@ GEM
34
34
  json (2.1.0)
35
35
  method_source (0.9.0)
36
36
  mini_portile2 (2.4.0)
37
- nokogiri (1.10.7)
37
+ nokogiri (1.10.8)
38
38
  mini_portile2 (~> 2.4.0)
39
39
  parallel (1.12.1)
40
40
  parser (2.6.3.0)
@@ -49,7 +49,7 @@ GEM
49
49
  pry-stack_explorer (0.4.9.2)
50
50
  binding_of_caller (>= 0.7)
51
51
  pry (>= 0.9.11)
52
- public_suffix (4.0.1)
52
+ public_suffix (4.0.3)
53
53
  rainbow (3.0.0)
54
54
  rake (12.3.0)
55
55
  rspec (3.7.0)
@@ -76,8 +76,8 @@ GEM
76
76
  unicode-display_width (>= 1.4.0, < 1.6)
77
77
  ruby-mysql (2.9.14)
78
78
  ruby-progressbar (1.10.0)
79
- rubyzip (2.0.0)
80
- selenium-webdriver (3.142.6)
79
+ rubyzip (2.2.0)
80
+ selenium-webdriver (3.142.7)
81
81
  childprocess (>= 0.5, < 4.0)
82
82
  rubyzip (>= 1.2.2)
83
83
  sequel (4.49.0)
@@ -90,7 +90,7 @@ GEM
90
90
  hirb
91
91
  simplecov
92
92
  simplecov-html (0.10.2)
93
- test-unit (3.3.4)
93
+ test-unit (3.3.5)
94
94
  power_assert
95
95
  unicode-display_width (1.5.0)
96
96
 
data/example/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  ## You can check the example code in each directory
2
2
  * [hands-on](https://github.com/lifull-dev/bucky-core/blob/master/example/hands-on)
3
- * [bcuky-management](https://github.com/lifull-dev/bucky-core/blob/master/example/bucky-management)
3
+ * [bucky-management](https://github.com/lifull-dev/bucky-core/blob/master/example/bucky-management)
@@ -19,7 +19,7 @@ cd {test project name}
19
19
 
20
20
  ## 2. Sets connect information to DB
21
21
  - Use default value as following if you didn't change anything in Bucky-management's docker-compose.yml
22
- - Database name is according to what you set in RAILS_ENV when startup Bcuky-management
22
+ - Database name is according to what you set in RAILS_ENV when startup Bucky-management
23
23
  ```
24
24
  ## config/test_db_config.yml ##
25
25
 
@@ -10,7 +10,7 @@ cases:
10
10
  # You should create test case name as {test suite name + _ + number}
11
11
  - case_name: search_and_assert_1
12
12
  func: transition
13
- desc: Should able to search bucky-core in github, and move to bucky-core page.
13
+ desc: Should be able to search bucky-core in github, and move to bucky-core page.
14
14
  # Procedures to do in this case
15
15
  procs:
16
16
  - proc: Open github top page
@@ -10,7 +10,7 @@ cases:
10
10
  # You should create test case name as {test suite name + _ + number}
11
11
  - case_name: search_and_assert_1
12
12
  func: transition
13
- desc: Should able to search bucky-core in github, and move to bucky-core page.
13
+ desc: Should be able to search bucky-core in github, and move to bucky-core page.
14
14
  # Procedures to do in this case
15
15
  procs:
16
16
  - proc: Open github top page
@@ -11,7 +11,8 @@ module Bucky
11
11
  class << self
12
12
  # Error handling on bucky framework
13
13
  # @param [Object] err exception object
14
- def handle(err)
14
+ # @param [String] proc_name
15
+ def handle(err, _proc_name)
15
16
  Bucky::Utils::BuckyLogger.write(Bucky::Utils::Config.instance[:bucky_error], err)
16
17
  end
17
18
  end
@@ -19,7 +20,7 @@ module Bucky
19
20
 
20
21
  class DbConnectorException < Bucky::Core::Exception::BuckyException
21
22
  class << self
22
- def handle(err)
23
+ def handle(err, proc_name = nil)
23
24
  super
24
25
  raise err
25
26
  end
@@ -28,9 +29,11 @@ module Bucky
28
29
 
29
30
  class WebdriverException < Bucky::Core::Exception::BuckyException
30
31
  class << self
31
- def handle(err)
32
+ def handle(err, proc_name = nil)
32
33
  super
33
- raise err
34
+ raise err if proc_name.nil?
35
+
36
+ raise(err.class, "#{err.message}\nFail in proc: ##{proc_name}")
34
37
  end
35
38
  end
36
39
  end
@@ -15,9 +15,9 @@ module Bucky
15
15
 
16
16
  def add_test_procedure(procedures)
17
17
  procedures.each.with_index(1) do |procedure, index|
18
- puts " #{index}:#{procedure[:proc]}" if procedure.key?(:proc)
18
+ puts procedure[:proc].insert(0, " #{index}:") if procedure.key?(:proc)
19
19
  method = procedure[:exec].key?(:operate) ? :operate : :verify
20
- send(method, procedure[:exec])
20
+ send(method, procedure)
21
21
  end
22
22
  end
23
23
 
@@ -78,8 +78,6 @@ module Bucky
78
78
  end
79
79
 
80
80
  elements.first
81
- rescue StandardError => e
82
- Bucky::Core::Exception::WebdriverException.handle(e)
83
81
  end
84
82
 
85
83
  def raise_if_elements_empty(elements, method, value)
@@ -37,15 +37,15 @@ module Bucky
37
37
  end
38
38
 
39
39
  # Call mothod of verification
40
- # @param [Hash] verify_args e.g.) {verify: "assert_title", expect: "page title"}
40
+ # @param [Hash] verify_args e.g.) {:proc=>"proc discretion", :exec=>{verify: "assert_title", expect: "page title"}}
41
41
  def verify(**verify_args)
42
- @service_verifications.send(verify_args[:verify], verify_args)
42
+ @service_verifications.send(verify_args[:exec][:verify], verify_args)
43
43
  end
44
44
 
45
45
  # Call method of user operation
46
- # @param [Hash] op_args e.g.){page: 'top', part: 'rosen_tokyo', operation: 'click'}
46
+ # @param [Hash] op_args e.g.){:proc=>"proc discretion", :exec=>{page: 'top_page', part: 'fizz_button', operation: 'click'}}
47
47
  def operate(**op_args)
48
- @user_operator.send(op_args[:operate], method_name, op_args)
48
+ @user_operator.send(op_args[:exec][:operate], method_name, op_args)
49
49
  end
50
50
 
51
51
  def setup
@@ -22,19 +22,19 @@ module Bucky
22
22
  def method_missing(operation, test_case_name, **args)
23
23
  @operation = operation
24
24
  @test_case_name = test_case_name
25
- Bucky::Utils::BuckyLogger.write(test_case_name, args)
25
+ Bucky::Utils::BuckyLogger.write(test_case_name, args[:exec])
26
26
 
27
27
  # Call method of UserOperationHelper
28
- return @operation_helper.send(@operation, args) if @operation_helper.methods.include?(@operation)
28
+ return @operation_helper.send(@operation, args[:exec]) if @operation_helper.methods.include?(@operation)
29
29
 
30
30
  # Call method of page object
31
31
  # e.g) {page: 'top', operation: 'input_freeword', word: 'testing word'}
32
- return page_method(args) if args.key?(:page) && !args.key?(:part)
32
+ return page_method(args[:exec]) if args[:exec].key?(:page) && !args[:exec].key?(:part)
33
33
 
34
34
  # Call method of part
35
- part_mothod(args) if args.key?(:part)
35
+ part_mothod(args[:exec]) if args[:exec].key?(:part)
36
36
  rescue StandardError => e
37
- Bucky::Core::Exception::WebdriverException.handle(e)
37
+ Bucky::Core::Exception::WebdriverException.handle(e, args[:proc].strip)
38
38
  end
39
39
 
40
40
  private
@@ -26,14 +26,12 @@ module Bucky
26
26
  def method_missing(verification, **args)
27
27
  if e2e_verification.respond_to? verification
28
28
  puts " #{verification} is defined in E2eVerificationClass."
29
- e2e_verification.send(verification, args)
30
- elsif args.key?(:page)
31
- send(args[:page]).send(verification, args)
29
+ e2e_verification.send(verification, args[:exec])
30
+ elsif args[:exec].key?(:page)
31
+ send(args[:exec][:page]).send(verification, args[:exec])
32
32
  else
33
- raise StandardError, "Undefined verification method or invalid arguments. #{verification},#{args}"
33
+ raise StandardError, "Undefined verification method or invalid arguments. #{verification},#{args[:exec]}"
34
34
  end
35
- rescue StandardError => e
36
- raise e
37
35
  end
38
36
 
39
37
  private
data/lib/bucky/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bucky
4
4
  module Version
5
- VERSION = '0.9.23'
5
+ VERSION = '0.10.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bucky-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.23
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaotoKishino
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2019-12-23 00:00:00.000000000 Z
16
+ date: 2020-02-20 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: awesome_print