insite 0.0.7 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/insite/component/component.rb +1 -1
- data/lib/insite/constants.rb +1 -3
- data/lib/insite/examples/material_angular_io/components/mat_chip_list.rb +1 -1
- data/lib/insite/insite.rb +31 -0
- data/lib/insite/page/defined_page.rb +0 -1
- data/lib/insite/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ff0c306e9463fd4190878e92ddf560df01c426c617019c36be931948e24b65e2
|
4
|
+
data.tar.gz: 3ff42e536b0e3e324ff73c8bed4788f17075cbec8684c43acb892bf2ee33339a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd5cc232ca61766e2e137ec0457e953fb56f23f772bcc9273fb2641436a3acdfe279e75f471efbc093aa33a3dc6a54ae87a8a24834834923040a93f27784ddc4
|
7
|
+
data.tar.gz: 84facfc95ccf63e0c9b260ed6644ca8cbffd91cb569adc6573b38985589cbd6011220481465941bad178ca2e6a9faae7ada668ff0993e972470123aaa6bab476
|
@@ -2,7 +2,7 @@ require_relative 'component_methods'
|
|
2
2
|
require_relative 'component_collection'
|
3
3
|
require_relative 'component_instance_methods'
|
4
4
|
require_relative '../methods/common_methods'
|
5
|
-
|
5
|
+
|
6
6
|
# Allows the page object developer to encapsulate common web application features
|
7
7
|
# into components that can be reused across multiple pages.
|
8
8
|
module Insite
|
data/lib/insite/constants.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
module Insite
|
3
2
|
METHOD_MAP = {Watir::Rect=>[:rect],
|
4
3
|
Watir::Menu=>[:menu],
|
@@ -169,7 +168,6 @@ module Insite
|
|
169
168
|
Watir::Use=>[:use],
|
170
169
|
Watir::TableCaption=>[:caption],
|
171
170
|
Watir::FieldSet=>[:fieldset, :field_set],
|
172
|
-
Watir::RadioSet=>[:radio_set],
|
173
171
|
Watir::FieldSetCollection=>[:fieldsets, :field_sets],
|
174
172
|
Watir::Input=>[:input],
|
175
173
|
Watir::Output=>[:output],
|
@@ -316,7 +314,7 @@ module Insite
|
|
316
314
|
bdis colgroup div font h6s kbds menuitems optgroups radial_gradient select_list svgs time
|
317
315
|
bdo colgroups divs fonts hatchpath keygen menus option radial_gradients select_lists switch times
|
318
316
|
bdos cols dl footer hatchpaths keygens mesh options radio selects switches titles
|
319
|
-
blockquote cursor dls footers head label meshes output
|
317
|
+
blockquote cursor dls footers head label meshes output small symbol tr
|
320
318
|
blockquotes cursors dt foreign_object header labels meshgradient outputs radios smalls symbols track
|
321
319
|
body data dts foreign_objects headers legend meshgradients p rb solidcolor table tracks
|
322
320
|
bodys datalist element form heads legends meshpatch param rbs solidcolors tables trs
|
data/lib/insite/insite.rb
CHANGED
@@ -155,14 +155,45 @@ module Insite
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
|
+
# Update the site class with methods for each page that is defined.
|
158
159
|
self.class.class_eval do
|
160
|
+
|
161
|
+
# Returns a page object for the page.
|
159
162
|
define_method(current_page.to_s.underscore) do |args = nil, block = nil|
|
160
163
|
current_page.new(self, args)
|
161
164
|
end
|
162
165
|
|
166
|
+
# Returns true if the page is being displayed, false if not.
|
163
167
|
define_method("#{current_page.to_s.underscore}?") do
|
164
168
|
on_page? current_page
|
165
169
|
end
|
170
|
+
|
171
|
+
# Similar to the method above but attempts navigation prior to the page
|
172
|
+
# check. Returns a boolean rather than a page object: true if the
|
173
|
+
# right page was loaded successfully, false if not. A navigation attempt
|
174
|
+
# always occurs when this method is called.
|
175
|
+
#
|
176
|
+
# The main benefit of this method is to make it easier to write test
|
177
|
+
# scenarios for situations where you know navigation is going to fail
|
178
|
+
# (Examples of this would be session timeouts or role/privilege
|
179
|
+
# test scenarios.) Normally an Insite::Errors::WrongPageError is
|
180
|
+
# automatically raised when a navigation attempt fails. So in order to
|
181
|
+
# test these sorts of scenarios you'd have to do a little more work to
|
182
|
+
# handle the exception. Examples in RSpec:
|
183
|
+
#
|
184
|
+
# The "hard" way:
|
185
|
+
# expect {s.login_page }.to raise_error(Insite::Errors::WrongPageError)
|
186
|
+
#
|
187
|
+
# The same assert using this method:
|
188
|
+
# expect(s.try_login_page).to be_truthy
|
189
|
+
define_method("try_#{current_page.to_s.underscore}") do |args = nil, block = nil|
|
190
|
+
begin
|
191
|
+
current_page.new(self, args)
|
192
|
+
true
|
193
|
+
rescue Insite::Errors::WrongPageError => e
|
194
|
+
return false
|
195
|
+
end
|
196
|
+
end
|
166
197
|
end
|
167
198
|
end
|
168
199
|
end
|
data/lib/insite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: insite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Fitisoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
version: '0'
|
227
227
|
requirements: []
|
228
228
|
rubyforge_project:
|
229
|
-
rubygems_version: 2.
|
229
|
+
rubygems_version: 2.7.6
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: Insite is a page object library that's geared towards writing reusable code
|