bermuda 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bermuda (0.0.1)
5
- capybara (~> 0.4.0.rc)
4
+ bermuda (0.0.2)
5
+ capybara (~> 0.4.0)
6
6
  cucumber (~> 0.9.2)
7
7
 
8
8
  GEM
@@ -67,6 +67,6 @@ PLATFORMS
67
67
 
68
68
  DEPENDENCIES
69
69
  bermuda!
70
- capybara (~> 0.4.0.rc)
70
+ capybara (~> 0.4.0)
71
71
  cucumber (~> 0.9.2)
72
72
  rspec (~> 2.0.0)
@@ -33,7 +33,7 @@ Then add the following lines to your selectors.rb:
33
33
  when /the "([^"]+)" accordion section/
34
34
  [:xpath, Bermuda::XPath.accordion_content($1)]
35
35
  when /the "([^"]+)" dialog/
36
- [:xpath, Bermuda::XPath.dialog_content($1)]
36
+ [:xpath, Bermuda::XPath.dialog($1)]
37
37
  when /the "([^"]+)" tab/
38
38
  [:xpath, Bermuda::XPath.tab_content($1)]
39
39
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_dependency "cucumber", "~> 0.9.2"
23
- s.add_dependency "capybara", "~> 0.4.0.rc"
23
+ s.add_dependency "capybara", "~> 0.4.0"
24
24
 
25
25
  s.add_development_dependency "rspec", "~> 2.0.0"
26
26
  end
@@ -42,6 +42,10 @@ Feature: Step definitions
42
42
  When I close the "Basic dialog" dialog
43
43
  Then I should not see the "Basic dialog" dialog
44
44
 
45
+ When I visit the dialog page
46
+ And I press "Ok" within the "Basic dialog" dialog
47
+ Then I should not see the "Basic dialog" dialog
48
+
45
49
  Scenario: Progressbar steps
46
50
  When I visit the progressbar page
47
51
  Then the progress bar should be at 37%
@@ -25,6 +25,10 @@ Then /^I should see "([^"]+)"$/ do |text|
25
25
  page.should have_content(text)
26
26
  end
27
27
 
28
+ When /^I press "([^"]*)"$/ do |button|
29
+ click_button(button)
30
+ end
31
+
28
32
  When /^(?:|I )fill in "([^"]*)" with "([^"]*)"$/ do |field, value|
29
33
  fill_in(field, :with => value)
30
34
  end
@@ -6,7 +6,14 @@
6
6
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
7
7
  <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css">
8
8
  <script>
9
- $(function() { $( "#dialog" ).dialog(); });
9
+ $(function() {
10
+ $( "#dialog" ).dialog({
11
+ buttons: [{
12
+ text: "Ok",
13
+ click: function() { $(this).dialog("close"); }
14
+ }]
15
+ });
16
+ });
10
17
  </script>
11
18
  </head>
12
19
  <body>
@@ -11,7 +11,7 @@ module HtmlSelectorsHelpers
11
11
  when /the "([^"]+)" accordion section/
12
12
  [:xpath, Bermuda::XPath.accordion_content($1)]
13
13
  when /the "([^"]+)" dialog/
14
- [:xpath, Bermuda::XPath.dialog_content($1)]
14
+ [:xpath, Bermuda::XPath.dialog($1)]
15
15
  when /the "([^"]+)" tab/
16
16
  [:xpath, Bermuda::XPath.tab_content($1)]
17
17
 
@@ -1,3 +1,3 @@
1
1
  module Bermuda
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -33,6 +33,10 @@ module Bermuda
33
33
  xpath
34
34
  end
35
35
 
36
+ def accordion_content(title = nil, options = {})
37
+ accordion_header(title, options).next_sibling
38
+ end
39
+
36
40
  def autocompletion(text = nil)
37
41
  xpath = descendant[attr(:class).includes('ui-autocomplete')]
38
42
  xpath = xpath.descendant[attr(:class).includes('ui-menu-item')]
@@ -40,20 +44,12 @@ module Bermuda
40
44
  xpath
41
45
  end
42
46
 
43
- def accordion_content(title = nil, options = {})
44
- accordion_header(title, options).next_sibling
45
- end
46
-
47
47
  def dialog(title = nil)
48
48
  xpath = descendant[attr(:class).includes('ui-dialog')]
49
49
  xpath = xpath[descendant[attr(:class).includes('ui-dialog-title')].text.is title] if title
50
50
  xpath
51
51
  end
52
52
 
53
- def dialog_content(title = nil)
54
- dialog(title).descendant[attr(:class).includes('ui-dialog-content')]
55
- end
56
-
57
53
  def progressbar(options = {})
58
54
  xpath = descendant[attr(:class).includes('ui-progressbar')]
59
55
  xpath = xpath[attr(:'aria-valuenow') == options[:value]] if options[:value]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Firebaugh
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-17 00:00:00 -07:00
17
+ date: 2010-10-27 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -44,8 +44,7 @@ dependencies:
44
44
  - 0
45
45
  - 4
46
46
  - 0
47
- - rc
48
- version: 0.4.0.rc
47
+ version: 0.4.0
49
48
  type: :runtime
50
49
  version_requirements: *id002
51
50
  - !ruby/object:Gem::Dependency