screengem 0.3.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: 59794b81ef61dfaac8b24ada31840f7b06bf10256b49a26d938409902a0733e2
4
- data.tar.gz: 574b6278358edde4ffcfeda8426b0873949deee001162694045919a5ce2eb706
3
+ metadata.gz: f02d39c76804aaa3f566dec16b10dc343444c547cc4aa9d809e9ad5de1f78e56
4
+ data.tar.gz: 58073c450f813901633963b05408992085eb052722001c44fb2f95c52715bbfd
5
5
  SHA512:
6
- metadata.gz: a2a37e7c2235866deae4b2462a073735fadb47d48ed187080541169a10b05cfb3445db06bc7740b247e0a27a738216342d33e507ec281eb0b15b01c59264b2a7
7
- data.tar.gz: 7f361d7e3a584863de72b8fb52964a1194981826a1a6249b6fe5270cddaa65a4ab28c67523682cdd5785eab19d483484969c4f8f68b5e25f609c585e78fa4033
6
+ metadata.gz: f7f94ccef0e664c4f61ffa859ecee1043080f69ad0eb1fb437ba8b5bca4379170143a2d0e62e6a04f1d23acd9fef79e82a2db51bccd44a0f6635b02c9369a8ea
7
+ data.tar.gz: 6e0d8aa3e48eead2f841ec00e22c3cf0dfa4c22d2d42ce531078f7e36482b31b7cafdec977be744cf926c944fab98770f8f20207f0dcaa4c8bba0ba3d02d71a2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.4.0 (2019-03-18)
6
+
7
+ ### New Features
8
+
9
+ * Rename Screengem::FeaturePage to Screengem::ScreenElement
10
+
5
11
  ## 0.3.0 (2019-03-16)
6
12
 
7
13
  ### New Features
@@ -10,7 +10,7 @@ module Screengem
10
10
  #
11
11
  # Action, question, and task instances (aka primitives) are configured with:
12
12
  # (1) a reference to the actor that is interacting with the primitive
13
- # (2) a reference to the screen instance that hosts accessors to the page objects.
13
+ # (2) a reference to the screen instance that hosts accessors to the screen elements.
14
14
  #
15
15
  module Actor
16
16
  #
@@ -81,7 +81,7 @@ module Screengem
81
81
  end
82
82
 
83
83
  def screen
84
- Screengem::PageReferences.instance
84
+ Screengem::ScreenElements.instance
85
85
  end
86
86
  end
87
87
  end
@@ -77,7 +77,7 @@ module Screengem
77
77
  # Always respond with no dampening.
78
78
  #
79
79
  class None
80
- def seconds_to_dampen(_primitive_scope, _class_name)
80
+ def seconds_to_dampen(_primitive_scope, _primitive_class_name)
81
81
  0
82
82
  end
83
83
  end
@@ -4,14 +4,12 @@ module Screengem
4
4
  # Knows the behaviour for error creation primitives.
5
5
  #
6
6
  module FactoryCreationError
7
- attr_reader :error_message
8
-
9
7
  def initialize(error_message)
10
8
  @error_message = error_message
11
9
  end
12
10
 
13
11
  def execute
14
- raise Screengem::ScreengemError, error_message
12
+ raise Screengem::ScreengemError, @error_message
15
13
  end
16
14
  end
17
15
  end
@@ -0,0 +1,8 @@
1
+ module Screengem
2
+ #
3
+ # Base class for all screen elements.
4
+ #
5
+ class ScreenElement
6
+ include Capybara::DSL
7
+ end
8
+ end
@@ -1,25 +1,25 @@
1
1
  module Screengem
2
2
  #
3
- # Singleton that gives the ability to get references to page objects.
3
+ # Singleton that gives the ability to get references to screen elements.
4
4
  #
5
- # On initialization generate a factory method for each page object we can find. Example:
5
+ # On initialization generate a factory method for each screen element we can find. Example:
6
6
  #
7
7
  # def login_page
8
8
  # Pages::LoginPage.new
9
9
  # end
10
10
  #
11
- class PageReferences
12
- include Singleton
11
+ class ScreenElements
12
+ include ::Singleton
13
13
 
14
14
  def initialize
15
15
  generated_method_names = []
16
16
 
17
- Screengem::FeaturePage.descendants.each do |page_object|
18
- class_name = page_object.name
17
+ Screengem::ScreenElement.descendants.each do |screen_element|
18
+ class_name = screen_element.name
19
19
  method_name = class_name.demodulize.underscore
20
20
 
21
21
  if generated_method_names.include?(method_name)
22
- raise "Name collision: two page objects resolve to '#{method_name}'."
22
+ raise "Name collision: two screen elements resolve to '#{method_name}'."
23
23
  end
24
24
 
25
25
  generated_method_names << method_name
@@ -1,3 +1,3 @@
1
1
  module Screengem
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/screengem.rb CHANGED
@@ -6,8 +6,8 @@ require "active_support/core_ext"
6
6
 
7
7
  require "capybara/dsl"
8
8
 
9
- require "screengem/feature_page"
10
9
  require "screengem/incorrect_answer"
10
+ require "screengem/screen_element"
11
11
  require "screengem/screengem_error"
12
12
 
13
13
  require "screengem/configuration"
@@ -37,7 +37,7 @@ require "screengem/factories/standard_action_factory"
37
37
  require "screengem/factories/question_factory"
38
38
  require "screengem/factories/task_factory"
39
39
 
40
- require "screengem/page_references"
40
+ require "screengem/screen_elements"
41
41
 
42
42
  require "screengem/cli"
43
43
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screengem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alistair McKinnell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-16 00:00:00.000000000 Z
11
+ date: 2019-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -177,11 +177,11 @@ files:
177
177
  - lib/screengem/factories/question_factory.rb
178
178
  - lib/screengem/factories/standard_action_factory.rb
179
179
  - lib/screengem/factories/task_factory.rb
180
- - lib/screengem/feature_page.rb
181
180
  - lib/screengem/incorrect_answer.rb
182
- - lib/screengem/page_references.rb
183
181
  - lib/screengem/primitive_key.rb
184
182
  - lib/screengem/question.rb
183
+ - lib/screengem/screen_element.rb
184
+ - lib/screengem/screen_elements.rb
185
185
  - lib/screengem/screengem_error.rb
186
186
  - lib/screengem/task.rb
187
187
  - lib/screengem/version.rb
@@ -1,8 +0,0 @@
1
- module Screengem
2
- #
3
- # Base class for all feature pages.
4
- #
5
- class FeaturePage
6
- include Capybara::DSL
7
- end
8
- end