acceptance_test 1.7.14 → 1.8.0

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
- ODIwYmRkYjAwZWQzNDJhNzRlN2RkOTNhNmUwNWRmMmY3YzkzMDdiMQ==
4
+ MmYzYjFjN2I1NGJkMzI4NzVhZmRkMjZlYzE1ZjhhMjg1ZTM1YmU2MQ==
5
5
  data.tar.gz: !binary |-
6
- YzA1Zjc0MTdjNjRjOTQ2NTRjNmZmZmQ5YjBlOWQyZGJmNWY2Y2M3NA==
6
+ MzFkMDY3MzcxNTVmMzVkMGM5MDRlYTgzOWFmOWRlNjBjYzI5OTk4ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWI0NmIwMmU1MDM3YTM1OWE0OGY3NzZkNDM5ZjlmMTI1MDZkMGYwMjg1YTM3
10
- ZTZhMmJiNWUwMmNkNGJjZTY1ZGJjM2ExNmJjMzQwNzQ0MWQ3MjY5MDMyYTky
11
- YTEyMzFmZDNkNzM1ODFkMDQyNDkzZTc1MDA1OThlNDNjOWQ4ZTI=
9
+ ZDg0OWM2MDM3MjEzMGRkODJmNWNlZWQ4YzI1OWU2NjFkNTAyNjNlYzhlNWZl
10
+ ZjJjNzc2M2YwNjg5OWQxMmY0MjA2MzE3ZjQ5MTFhMTUzMDMyODc3NWY3ZTIw
11
+ NDFjZTczMWFhY2Y4MjRkNmYxYWU2MjIxMjYyMmRhMDI1NjYwYWQ=
12
12
  data.tar.gz: !binary |-
13
- ZjM0ZjAzY2EzNjk2NmZjYzFmMDE2NjI2M2Q1NjJjN2EzZWYzMWU5OGRhMjU2
14
- ZjI1MWFkOTMzMjNmM2JlNGI1ODZhM2YzNTI5ZjM0MDhkYzIzMmU1M2QwYzll
15
- MDhmOTU3YzFhNGEyYTAwMDM3MTUwODgyYzZjNWJmYjQxMTA5MzQ=
13
+ MTE5MzllYmIxZTgyNTM2MGQ5YTJmOThmMDA1Y2M4YTAxZDIxODMxY2NhNzA0
14
+ YzQ0OTIwOWY2MGUzZGUzZmNkYzkxMGMzMDBjMmZmYTg0MjY1OTdlM2ExODg3
15
+ OTAwMWJlMWU1ZjNmYTkxMzBlOGYyNjI5OTliMzdhMDNmMjFiZjg=
data/CHANGES CHANGED
@@ -199,4 +199,12 @@
199
199
 
200
200
  == Version 1.7.14
201
201
 
202
- * Bug fix
202
+ * Bug fix
203
+
204
+ == Version 1.7.15
205
+
206
+ * Bug fix
207
+
208
+ == Version 1.8.0
209
+
210
+ * Adding step meta-sugar to PageSet
@@ -53,11 +53,7 @@ class AcceptanceTest
53
53
  driver = driver(metadata)
54
54
 
55
55
  if driver and exception and page and not [:webkit].include? driver
56
- screenshot_dir = File.expand_path(config[:screenshot_dir])
57
-
58
- FileUtils.mkdir_p screenshot_dir
59
-
60
- screenshot_maker.basedir = screenshot_dir
56
+ screenshot_maker.basedir = File.expand_path(config[:screenshot_dir])
61
57
 
62
58
  screenshot_maker.make page, metadata
63
59
 
@@ -5,18 +5,15 @@ require 'acceptance_test/page'
5
5
  class PageSet
6
6
  extend Forwardable
7
7
 
8
- attr_reader :pages
9
8
  attr_accessor :context
9
+ attr_reader :pages, :input
10
10
 
11
11
  def initialize context
12
12
  @context = context
13
13
  @pages = []
14
+ @input = {}
14
15
  end
15
16
 
16
- # def page
17
- # context.page
18
- # end
19
-
20
17
  def session
21
18
  context.page
22
19
  end
@@ -25,6 +22,23 @@ class PageSet
25
22
  self.instance_eval &code
26
23
  end
27
24
 
25
+ def self.step title
26
+ yield if block_given?
27
+ end
28
+
29
+ def step title
30
+ values = []
31
+
32
+ params = title.gsub(/:\w+/)
33
+
34
+ params.each do |param|
35
+ key = param.gsub(":", "").to_sym
36
+ values << input[key] if input[key]
37
+ end
38
+
39
+ yield *values if block_given?
40
+ end
41
+
28
42
  def delegate_to_pages *pages
29
43
  pages.each do |page|
30
44
  delegate_to_page page
@@ -6,6 +6,8 @@ class ScreenshotMaker
6
6
  end
7
7
 
8
8
  def make page, options
9
+ FileUtils.mkdir_p basedir
10
+
9
11
  file_path = options[:file_path]
10
12
 
11
13
  name = screenshot_name(build_name(file_path), options[:line_number])
@@ -1,3 +1,3 @@
1
1
  class AcceptanceTest
2
- VERSION = "1.7.14"
2
+ VERSION = "1.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acceptance_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.14
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Shvets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-28 00:00:00.000000000 Z
11
+ date: 2014-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gemspec_deps_gen