gwt_widgets 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ === Release 0.0.6 / 2013-4-19
2
+ Add Stack Panel support
3
+
1
4
  === Release 0.0.5 / 2013-4-16
2
5
  Add Tab Panel support
3
6
 
@@ -1,7 +1,7 @@
1
1
  Feature: Using the gwt_dialog_box Dialog Box Widget
2
2
 
3
3
  Background:
4
- Given I am on the showcase date picker page
4
+ Given I am on the Showcase Date Picker page
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
@@ -1,7 +1,7 @@
1
1
  Feature: Using the gwt_dialog_box Dialog Box Widget
2
2
 
3
3
  Background:
4
- Given I am on the showcase dialog box page
4
+ Given I am on the Showcase Dialog Box page
5
5
  And I click the 'Show Dialog Box' button
6
6
 
7
7
  Scenario: Getting information from the page
@@ -0,0 +1,24 @@
1
+ Feature: Using the Stack Panel Widget
2
+
3
+ Background:
4
+ Given I am on the Showcase Stack Panel page
5
+
6
+
7
+ Scenario: View panel content
8
+ When I select the "Filters" panel from the stack
9
+ Then I see "Sent by me"
10
+
11
+ Scenario: Selected panel element
12
+ When I select the "Contacts" panel from the stack
13
+ Then the current panel is "Contacts"
14
+
15
+ Scenario: Grabbing all panel names
16
+ Then the stack panel labels are:
17
+ | Mail |
18
+ | Filters |
19
+ | Contacts |
20
+
21
+ Scenario: Determine which panel is selected
22
+ When I select the "Contacts" panel from the stack
23
+ Then the "Contacts" panel is selected
24
+ And the "Filters" panel is not selected
@@ -1,5 +1,5 @@
1
1
 
2
- Given /^I am on the showcase date picker page$/ do
2
+ Given /^I am on the Showcase Date Picker page$/ do
3
3
  visit DatePickerPage
4
4
  @current_page.wait_until do
5
5
  @current_page.text.include? 'Permanent DatePicker:'
@@ -1,4 +1,4 @@
1
- Given /^I am on the showcase dialog box page$/ do
1
+ Given /^I am on the Showcase Dialog Box page$/ do
2
2
  visit DialogBoxPage
3
3
  @current_page.wait_until do
4
4
  @current_page.show_dialog?
@@ -0,0 +1,28 @@
1
+ Given /^I am on the Showcase Stack Panel page$/ do
2
+ visit StackPanelPage
3
+ @current_page.wait_until do
4
+ @current_page.text.include? 'Stack Panel'
5
+ end
6
+ end
7
+
8
+ When /^I select the "([^"]*)" panel from the stack$/ do |label|
9
+ on(StackPanelPage).panels.select(label)
10
+ end
11
+
12
+ Then /^the current panel is "([^"]*)"$/ do |label|
13
+ on(StackPanelPage).panels.selected.should == label
14
+ end
15
+
16
+ Then /^the stack panel labels are:$/ do |table|
17
+ table.rows.each do |row|
18
+ on(StackPanelPage).panels.labels.include?(row[0]).should == true
19
+ end
20
+ end
21
+
22
+ Then /^the "([^"]*)" panel is selected$/ do |label|
23
+ on(StackPanelPage).panels.selected.should == label
24
+ end
25
+
26
+ Then /^the "([^"]*)" panel is not selected$/ do |label|
27
+ (on(StackPanelPage).panels.selected == label).should == false
28
+ end
@@ -1,4 +1,4 @@
1
- Given /^I am on the showcase tab layout panel page$/ do
1
+ Given /^I am on the Showcase Tab Layout Panel page$/ do
2
2
  visit TabPanelPage
3
3
  @current_page.wait_until do
4
4
  @current_page.text.include? 'Tab Layout Panel'
@@ -0,0 +1,13 @@
1
+ class StackPanelPage
2
+ include PageObject
3
+
4
+ page_url "http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwStackPanel"
5
+
6
+ gwt_stackpanel(:panels, :class => 'gwt-DecoratedStackPanel')
7
+
8
+ def panels
9
+ panels_element
10
+ end
11
+
12
+
13
+ end
@@ -1,7 +1,7 @@
1
1
  Feature: Using the GWT Tab Panel Widget
2
2
 
3
3
  Background:
4
- Given I am on the showcase tab layout panel page
4
+ Given I am on the Showcase Tab Layout Panel page
5
5
 
6
6
  Scenario: User is presented with tabs
7
7
  Then I see a tab layout panel
@@ -0,0 +1,16 @@
1
+ class GwtWidgets::StackPanel < PageObject::Elements::Table
2
+
3
+ def select(label)
4
+ div_element(:class => 'cw-StackPanelHeader', :text => label).click
5
+ end
6
+
7
+ def selected
8
+ cell_element(:class => 'gwt-StackPanelItem-selected').text
9
+ end
10
+
11
+ def labels
12
+ div_elements(:class => 'cw-StackPanelHeader').map(&:text)
13
+ end
14
+ end
15
+
16
+
@@ -1,4 +1,3 @@
1
- #class JQueryUIWidgets::Tabs < PageObject::Elements::UnorderedList
2
1
  class GwtWidgets::TabPanel < PageObject::Elements::Div
3
2
 
4
3
  def select(label)
@@ -13,5 +12,3 @@ class GwtWidgets::TabPanel < PageObject::Elements::Div
13
12
  div_elements(:class => 'gwt-Label').map(&:text)
14
13
  end
15
14
  end
16
-
17
-
@@ -1,3 +1,3 @@
1
1
  module GwtWidgets
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/gwt_widgets.rb CHANGED
@@ -4,6 +4,7 @@ require 'gwt_widgets/dialog_box'
4
4
  require 'gwt_widgets/date_picker'
5
5
  require 'gwt_widgets/date_box'
6
6
  require 'gwt_widgets/tab_panel'
7
+ require 'gwt_widgets/stack_panel'
7
8
 
8
9
  module GwtWidgets
9
10
 
@@ -11,5 +12,6 @@ module GwtWidgets
11
12
  PageObject.register_widget(:gwt_datebox, GwtWidgets::DateBox, 'input')
12
13
  PageObject.register_widget(:gwt_datepicker, GwtWidgets::DatePicker, 'table')
13
14
  PageObject.register_widget(:gwt_tabpanel, GwtWidgets::TabPanel, 'div')
15
+ PageObject.register_widget(:gwt_stackpanel, GwtWidgets::StackPanel, 'table')
14
16
 
15
17
  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.5
4
+ version: 0.0.6
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-04-16 00:00:00.000000000 Z
12
+ date: 2013-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: page-object
@@ -140,14 +140,17 @@ files:
140
140
  - cucumber.yml
141
141
  - features/datepicker.feature
142
142
  - features/dialog_box.feature
143
+ - features/stack_panel.feature
143
144
  - features/step_definitions/datebox_steps.rb
144
145
  - features/step_definitions/datepicker_steps.rb
145
146
  - features/step_definitions/dialogbox_steps.rb
147
+ - features/step_definitions/stack_panel_steps.rb
146
148
  - features/step_definitions/tab_panel_steps.rb
147
149
  - features/support/env.rb
148
150
  - features/support/hooks.rb
149
151
  - features/support/pages/date_picker_page.rb
150
152
  - features/support/pages/dialog_box_page.rb
153
+ - features/support/pages/stack_panel_page.rb
151
154
  - features/support/pages/tab_panel_page.rb
152
155
  - features/support/persistent_browser.rb
153
156
  - features/tab_panel.feature
@@ -156,6 +159,7 @@ files:
156
159
  - lib/gwt_widgets/date_box.rb
157
160
  - lib/gwt_widgets/date_picker.rb
158
161
  - lib/gwt_widgets/dialog_box.rb
162
+ - lib/gwt_widgets/stack_panel.rb
159
163
  - lib/gwt_widgets/tab_panel.rb
160
164
  - lib/gwt_widgets/version.rb
161
165
  homepage: http://github.com/joelbyler/gwt_widgets
@@ -172,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
176
  version: '0'
173
177
  segments:
174
178
  - 0
175
- hash: -3714005059541699473
179
+ hash: 2854851967373688280
176
180
  required_rubygems_version: !ruby/object:Gem::Requirement
177
181
  none: false
178
182
  requirements:
@@ -181,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
185
  version: '0'
182
186
  segments:
183
187
  - 0
184
- hash: -3714005059541699473
188
+ hash: 2854851967373688280
185
189
  requirements: []
186
190
  rubyforge_project: gwt_widgets
187
191
  rubygems_version: 1.8.25
@@ -191,14 +195,17 @@ summary: PageObject Widgets extention for GWT apps
191
195
  test_files:
192
196
  - features/datepicker.feature
193
197
  - features/dialog_box.feature
198
+ - features/stack_panel.feature
194
199
  - features/step_definitions/datebox_steps.rb
195
200
  - features/step_definitions/datepicker_steps.rb
196
201
  - features/step_definitions/dialogbox_steps.rb
202
+ - features/step_definitions/stack_panel_steps.rb
197
203
  - features/step_definitions/tab_panel_steps.rb
198
204
  - features/support/env.rb
199
205
  - features/support/hooks.rb
200
206
  - features/support/pages/date_picker_page.rb
201
207
  - features/support/pages/dialog_box_page.rb
208
+ - features/support/pages/stack_panel_page.rb
202
209
  - features/support/pages/tab_panel_page.rb
203
210
  - features/support/persistent_browser.rb
204
211
  - features/tab_panel.feature