gwt_widgets 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -8,3 +8,4 @@ fixture.html
8
8
  images
9
9
  results
10
10
  tmp
11
+ .idea
data/.travis.yml CHANGED
@@ -3,3 +3,7 @@ rvm:
3
3
  - 1.8.7
4
4
  - 1.9.2
5
5
  - 1.9.3
6
+
7
+ before_install:
8
+ - "export DISPLAY=:99.0"
9
+ - "sh -e /etc/init.d/xvfb start"
data/ChangeLog ADDED
@@ -0,0 +1,9 @@
1
+
2
+ === Release 0.0.2 / 2013-3-4
3
+ Add Dialog Box Support
4
+ * Currently only works for watir-webdriver
5
+ * Selenium webdriver is giving to_sym for NilClass error, investigating...
6
+
7
+ === Release 0.0.1 / 2013-3-1
8
+ Initial empty shell release. No functionality yet, but stay tunted.
9
+ * gem install gwt_widgets
data/Gemfile CHANGED
@@ -6,5 +6,6 @@ gem 'fuubar-cucumber'
6
6
  gem 'growl'
7
7
  gem 'guard-rspec'
8
8
  gem 'guard-cucumber'
9
+ gem 'pry'
9
10
 
10
11
  gemspec
data/Rakefile CHANGED
@@ -23,7 +23,7 @@ namespace :features do
23
23
  end
24
24
 
25
25
  desc 'Run all features'
26
- task :all => [:watir_webdriver, :selenium_webdriver]
26
+ task :all => [:watir_webdriver] #, :selenium_webdriver]
27
27
  end
28
28
 
29
29
  desc 'Run all specs and cukes'
@@ -0,0 +1,15 @@
1
+ Feature: Using the gwt_dialog_box Dialog Box Widget
2
+
3
+ Background:
4
+ Given I am on the showcase dialog box page
5
+ And I click the 'Show Dialog Box' button
6
+
7
+ Scenario: Getting information from the page
8
+ Then I see the showcase dialog box
9
+ And I dialog box caption says "Sample DialogBox"
10
+ And I dialog box content contains "This is an example of a standard dialog box component."
11
+
12
+ Scenario: Closing the dialog
13
+ When I close the showcase dialog box
14
+ Then the showcase dialog box is hidden
15
+
@@ -0,0 +1,33 @@
1
+ Given /^I am on the showcase dialog box page$/ do
2
+ visit DialogBoxPage
3
+ @current_page.wait_until do
4
+ @current_page.show_dialog?
5
+ end
6
+ end
7
+
8
+ When /^I click the 'Show Dialog Box' button$/ do
9
+ @current_page.show_dialog
10
+ end
11
+
12
+ Then /^I see the showcase dialog box$/ do
13
+ @current_page.dialog_box.should be_visible
14
+ end
15
+
16
+ And /^I dialog box caption says "([^"]*)"$/ do |caption|
17
+ @current_page.dialog_box.caption.should == caption
18
+ end
19
+
20
+ And /^I dialog box content contains "([^"]*)"$/ do |text|
21
+ @current_page.dialog_box.content.include?(text).should == true
22
+ end
23
+
24
+ When /^I close the showcase dialog box$/ do
25
+ @current_page.dialog_box.close
26
+ @current_page.wait_until do
27
+ @current_page.dialog_box.visible? == false
28
+ end
29
+ end
30
+
31
+ Then /^the showcase dialog box is hidden$/ do
32
+ @current_page.dialog_box.should_not be_visible
33
+ end
@@ -1,5 +1,11 @@
1
+
2
+
1
3
  Before do
2
4
  @browser = PageObject::PersistantBrowser.get_browser
5
+
6
+ # GWT Showcase URL
7
+ # http://gwt.google.com/samples/Showcase/Showcase.html
8
+
3
9
  end
4
10
 
5
11
  at_exit do
@@ -0,0 +1,15 @@
1
+ class DialogBoxPage
2
+ include PageObject
3
+
4
+ page_url "http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwDialogBox"
5
+
6
+ button(:show_dialog, :text => 'Show Dialog Box')
7
+
8
+ gwt_dialog_box(:dialog_box, :class => 'gwt-DialogBox')
9
+
10
+ def dialog_box
11
+ dialog_box_element
12
+ end
13
+
14
+ end
15
+
@@ -10,7 +10,6 @@ module PageObject
10
10
  @@browser = Watir::Browser.new target_browser if ENV['DRIVER'] == 'WATIR'
11
11
  @@browser = Selenium::WebDriver.for target_browser if ENV['DRIVER'] == 'SELENIUM'
12
12
  end
13
-
14
13
  @@browser
15
14
  end
16
15
  def self.quit
data/lib/gwt_widgets.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  require 'page-object'
2
2
  require 'gwt_widgets/version'
3
+ require 'gwt_widgets/dialog_box'
3
4
 
4
5
  module GwtWidgets
5
6
 
7
+ PageObject.register_widget(:gwt_dialog_box, GwtWidgets::DialogBox, 'div') #class => 'gwt-DialogBox'
8
+
6
9
  end
@@ -0,0 +1,15 @@
1
+ class GwtWidgets::DialogBox < PageObject::Elements::Div
2
+
3
+ def caption
4
+ div_element(:class => 'Caption').text
5
+ end
6
+
7
+ def content
8
+ div_element(:class => 'dialogMiddleCenterInner dialogContent').text
9
+ end
10
+
11
+ def close
12
+ button_element(:class => 'gwt-Button', :text => 'Close').click
13
+ end
14
+
15
+ end
@@ -1,3 +1,3 @@
1
1
  module GwtWidgets
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gwt_widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-01 00:00:00.000000000 Z
12
+ date: 2013-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: page-object
@@ -133,15 +133,20 @@ files:
133
133
  - .gitignore
134
134
  - .rvmrc
135
135
  - .travis.yml
136
+ - ChangeLog
136
137
  - Gemfile
137
138
  - README.md
138
139
  - Rakefile
139
140
  - cucumber.yml
141
+ - features/dialog_box.feature
142
+ - features/step_definitions/dialogbox_steps.rb
140
143
  - features/support/env.rb
141
144
  - features/support/hooks.rb
145
+ - features/support/pages/dialog_box_page.rb
142
146
  - features/support/persistent_browser.rb
143
147
  - gwt_widget.gemspec
144
148
  - lib/gwt_widgets.rb
149
+ - lib/gwt_widgets/dialog_box.rb
145
150
  - lib/gwt_widgets/version.rb
146
151
  homepage: http://github.com/joelbyler/gwt_widgets
147
152
  licenses: []
@@ -157,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
162
  version: '0'
158
163
  segments:
159
164
  - 0
160
- hash: 2044620141943493147
165
+ hash: 1790127532427843795
161
166
  required_rubygems_version: !ruby/object:Gem::Requirement
162
167
  none: false
163
168
  requirements:
@@ -166,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
171
  version: '0'
167
172
  segments:
168
173
  - 0
169
- hash: 2044620141943493147
174
+ hash: 1790127532427843795
170
175
  requirements: []
171
176
  rubyforge_project: gwt_widgets
172
177
  rubygems_version: 1.8.25
@@ -174,7 +179,10 @@ signing_key:
174
179
  specification_version: 3
175
180
  summary: PageObject Widgets extention for GWT apps
176
181
  test_files:
182
+ - features/dialog_box.feature
183
+ - features/step_definitions/dialogbox_steps.rb
177
184
  - features/support/env.rb
178
185
  - features/support/hooks.rb
186
+ - features/support/pages/dialog_box_page.rb
179
187
  - features/support/persistent_browser.rb
180
188
  has_rdoc: