gwt_widgets 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
3
  - 1.9.2
5
4
  - 1.9.3
5
+ - 2.0
6
+ - jruby-19mode
6
7
 
7
8
  before_install:
8
9
  - "export DISPLAY=:99.0"
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ === Release 0.0.5 / 2013-4-16
2
+ Add Tab Panel support
3
+
1
4
  === Release 0.0.4 / 2013-3-20
2
5
  Add support for Selenium Webdriver / Page-Object platform
3
6
 
@@ -5,8 +5,8 @@ Feature: Using the gwt_dialog_box Dialog Box Widget
5
5
 
6
6
  Scenario: I choose a day from the date picker
7
7
  Given I choose the 14th day from the date picker
8
- Then I should see today's date highlighted on the date picker
9
- And I should see the 14th day selected on the date picker
8
+ Then I see today's date highlighted on the date picker
9
+ And I see the 14th day selected on the date picker
10
10
 
11
11
  # Scenario: I choose a day from the date input box
12
12
  # Given I click in the date box field
@@ -15,9 +15,10 @@ Given /^I choose the 16th day from the date box$/ do
15
15
  @current_page.datebox.choose_day 16
16
16
  end
17
17
 
18
- Then /^I should see the 16th day in the date box$/ do
18
+ Then /^I see the 16th day in the date box$/ do
19
19
  end
20
20
 
21
- Then /^I should see the 16th day in the date box field$/ do
21
+ Then /^I see the 16th day in the date box field$/ do
22
22
  @current_page.datebox.input.text.should == '16'
23
23
  end
24
+
@@ -3,12 +3,13 @@ Given /^I choose the 14th day from the date picker$/ do
3
3
  @current_page.datepicker.choose_day 14
4
4
  end
5
5
 
6
- Then /^I should see today's date highlighted on the date picker$/ do
6
+ Then /^I see today's date highlighted on the date picker$/ do
7
7
  todays_day = Time.new.day
8
8
  @current_page.datepicker.highlighted_day.should == todays_day.to_s
9
9
  end
10
10
 
11
- And /^I should see the 14th day selected on the date picker$/ do
11
+ And /^I see the 14th day selected on the date picker$/ do
12
12
  @current_page.datepicker.chosen_day.should == '14'
13
13
  end
14
14
 
15
+
@@ -0,0 +1,30 @@
1
+ Given /^I am on the showcase tab layout panel page$/ do
2
+ visit TabPanelPage
3
+ @current_page.wait_until do
4
+ @current_page.text.include? 'Tab Layout Panel'
5
+ end
6
+ end
7
+
8
+ Then /^I see a tab layout panel$/ do
9
+ on(TabPanelPage).tabs.exists?.should == true
10
+ end
11
+
12
+ And /^the tab labels are:$/ do |table|
13
+ table.rows.each do |row|
14
+ on(TabPanelPage).tabs.labels.include?(row[0]).should == true
15
+ end
16
+ end
17
+
18
+ When /^I select the "([^"]*)" tab$/ do |label|
19
+ on(TabPanelPage).tabs.select(label)
20
+ end
21
+
22
+ Then /^the current tab should be "([^"]*)"$/ do |label|
23
+ on(TabPanelPage).tabs.selected.should == label
24
+ end
25
+
26
+ Then /^I see "([^"]*)"$/ do |search_text|
27
+ @current_page.text.include?(search_text).should == true
28
+ end
29
+
30
+
@@ -0,0 +1,13 @@
1
+ class TabPanelPage
2
+ include PageObject
3
+
4
+ page_url "http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwTabLayoutPanel"
5
+
6
+ gwt_tabpanel(:tabs, :class => 'gwt-TabLayoutPanel')
7
+
8
+ def tabs
9
+ tabs_element
10
+ end
11
+
12
+
13
+ end
@@ -0,0 +1,19 @@
1
+ Feature: Using the GWT Tab Panel Widget
2
+
3
+ Background:
4
+ Given I am on the showcase tab layout panel page
5
+
6
+ Scenario: User is presented with tabs
7
+ Then I see a tab layout panel
8
+ And the tab labels are:
9
+ | Home |
10
+ | GWT Logo |
11
+ | More Info |
12
+
13
+ Scenario: View content of a tab
14
+ When I select the "More Info" tab
15
+ Then I see "Tabs are highly customizable using CSS."
16
+
17
+ Scenario: Select a tab
18
+ When I select the "GWT Logo" tab
19
+ Then the current tab should be "GWT Logo"
data/lib/gwt_widgets.rb CHANGED
@@ -3,11 +3,13 @@ require 'gwt_widgets/version'
3
3
  require 'gwt_widgets/dialog_box'
4
4
  require 'gwt_widgets/date_picker'
5
5
  require 'gwt_widgets/date_box'
6
+ require 'gwt_widgets/tab_panel'
6
7
 
7
8
  module GwtWidgets
8
9
 
9
10
  PageObject.register_widget(:gwt_dialogbox, GwtWidgets::DialogBox, 'div')
10
11
  PageObject.register_widget(:gwt_datebox, GwtWidgets::DateBox, 'input')
11
12
  PageObject.register_widget(:gwt_datepicker, GwtWidgets::DatePicker, 'table')
13
+ PageObject.register_widget(:gwt_tabpanel, GwtWidgets::TabPanel, 'div')
12
14
 
13
15
  end
@@ -2,7 +2,7 @@ class GwtWidgets::DatePicker < PageObject::Elements::Table
2
2
 
3
3
  def choose_day (day)
4
4
  #div_element(:class => 'datePickerDay', :text => day.to_s).click
5
- div_elements(:class => 'datePickerDay')[day.to_i + 4].click
5
+ div_elements(:class => 'datePickerDay')[day.to_i].click
6
6
  end
7
7
 
8
8
  def chosen_day
@@ -0,0 +1,17 @@
1
+ #class JQueryUIWidgets::Tabs < PageObject::Elements::UnorderedList
2
+ class GwtWidgets::TabPanel < PageObject::Elements::Div
3
+
4
+ def select(label)
5
+ div_element(:class => 'gwt-Label', :text => label).click
6
+ end
7
+
8
+ def selected
9
+ div_element(:class => 'gwt-TabLayoutPanelTab-selected').text
10
+ end
11
+
12
+ def labels
13
+ div_elements(:class => 'gwt-Label').map(&:text)
14
+ end
15
+ end
16
+
17
+
@@ -1,3 +1,3 @@
1
1
  module GwtWidgets
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
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.4
4
+ version: 0.0.5
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-20 00:00:00.000000000 Z
12
+ date: 2013-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: page-object
@@ -143,16 +143,20 @@ files:
143
143
  - features/step_definitions/datebox_steps.rb
144
144
  - features/step_definitions/datepicker_steps.rb
145
145
  - features/step_definitions/dialogbox_steps.rb
146
+ - features/step_definitions/tab_panel_steps.rb
146
147
  - features/support/env.rb
147
148
  - features/support/hooks.rb
148
149
  - features/support/pages/date_picker_page.rb
149
150
  - features/support/pages/dialog_box_page.rb
151
+ - features/support/pages/tab_panel_page.rb
150
152
  - features/support/persistent_browser.rb
153
+ - features/tab_panel.feature
151
154
  - gwt_widget.gemspec
152
155
  - lib/gwt_widgets.rb
153
156
  - lib/gwt_widgets/date_box.rb
154
157
  - lib/gwt_widgets/date_picker.rb
155
158
  - lib/gwt_widgets/dialog_box.rb
159
+ - lib/gwt_widgets/tab_panel.rb
156
160
  - lib/gwt_widgets/version.rb
157
161
  homepage: http://github.com/joelbyler/gwt_widgets
158
162
  licenses: []
@@ -168,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
172
  version: '0'
169
173
  segments:
170
174
  - 0
171
- hash: 3910878368132772078
175
+ hash: -3714005059541699473
172
176
  required_rubygems_version: !ruby/object:Gem::Requirement
173
177
  none: false
174
178
  requirements:
@@ -177,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
181
  version: '0'
178
182
  segments:
179
183
  - 0
180
- hash: 3910878368132772078
184
+ hash: -3714005059541699473
181
185
  requirements: []
182
186
  rubyforge_project: gwt_widgets
183
187
  rubygems_version: 1.8.25
@@ -190,9 +194,12 @@ test_files:
190
194
  - features/step_definitions/datebox_steps.rb
191
195
  - features/step_definitions/datepicker_steps.rb
192
196
  - features/step_definitions/dialogbox_steps.rb
197
+ - features/step_definitions/tab_panel_steps.rb
193
198
  - features/support/env.rb
194
199
  - features/support/hooks.rb
195
200
  - features/support/pages/date_picker_page.rb
196
201
  - features/support/pages/dialog_box_page.rb
202
+ - features/support/pages/tab_panel_page.rb
197
203
  - features/support/persistent_browser.rb
204
+ - features/tab_panel.feature
198
205
  has_rdoc: