capybara-webkit 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -272,8 +272,6 @@ Capybara = {
272
272
  textTypes = ["email", "number", "password", "search", "tel", "text", "textarea", "url"];
273
273
 
274
274
  if (textTypes.indexOf(type) != -1) {
275
- this.focus(index);
276
-
277
275
  maxLength = this.attribute(index, "maxlength");
278
276
  if (maxLength && value.length > maxLength) {
279
277
  length = maxLength;
@@ -281,15 +279,18 @@ Capybara = {
281
279
  length = value.length;
282
280
  }
283
281
 
284
- if (!node.readOnly)
282
+ if (!node.readOnly) {
283
+ this.focus(index);
284
+
285
285
  node.value = "";
286
286
 
287
- for (strindex = 0; strindex < length; strindex++) {
288
- CapybaraInvocation.keypress(value[strindex]);
289
- }
287
+ for (strindex = 0; strindex < length; strindex++) {
288
+ CapybaraInvocation.keypress(value[strindex]);
289
+ }
290
290
 
291
- if (value == '')
292
- this.trigger(index, "change");
291
+ if (value == '')
292
+ this.trigger(index, "change");
293
+ }
293
294
  } else if (type === "checkbox" || type === "radio") {
294
295
  if (node.checked != (value === "true")) {
295
296
  this.leftClick(index);
@@ -48,3 +48,5 @@ CHECK_COMMAND(WindowSize)
48
48
  CHECK_COMMAND(WindowMaximize)
49
49
  CHECK_COMMAND(GoBack)
50
50
  CHECK_COMMAND(GoForward)
51
+ CHECK_COMMAND(AcceptAlert)
52
+ CHECK_COMMAND(FindModal)
@@ -7,6 +7,8 @@ PRECOMPILED_DIR = $${BUILD_DIR}
7
7
  OBJECTS_DIR = $${BUILD_DIR}
8
8
  MOC_DIR = $${BUILD_DIR}
9
9
  HEADERS = \
10
+ FindModal.h \
11
+ AcceptAlert.h \
10
12
  GoForward.h \
11
13
  GoBack.h \
12
14
  WindowMaximize.h \
@@ -79,6 +81,8 @@ HEADERS = \
79
81
  StdinNotifier.h
80
82
 
81
83
  SOURCES = \
84
+ FindModal.cpp \
85
+ AcceptAlert.cpp \
82
86
  GoForward.cpp \
83
87
  GoBack.cpp \
84
88
  WindowMaximize.cpp \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-webkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-07-02 00:00:00.000000000 Z
16
+ date: 2014-08-18 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: capybara
@@ -24,7 +24,7 @@ dependencies:
24
24
  version: 2.0.2
25
25
  - - "<"
26
26
  - !ruby/object:Gem::Version
27
- version: 2.4.0
27
+ version: 2.5.0
28
28
  type: :runtime
29
29
  prerelease: false
30
30
  version_requirements: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: 2.0.2
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
- version: 2.4.0
37
+ version: 2.5.0
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: json
40
40
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +178,8 @@ files:
178
178
  - gemfiles/2.2.gemfile.lock
179
179
  - gemfiles/2.3.gemfile
180
180
  - gemfiles/2.3.gemfile.lock
181
+ - gemfiles/2.4.gemfile
182
+ - gemfiles/2.4.gemfile.lock
181
183
  - lib/capybara-webkit.rb
182
184
  - lib/capybara/webkit.rb
183
185
  - lib/capybara/webkit/browser.rb
@@ -204,6 +206,8 @@ files:
204
206
  - spec/spec_helper.rb
205
207
  - spec/support/app_runner.rb
206
208
  - spec/support/matchers/include_response.rb
209
+ - src/AcceptAlert.cpp
210
+ - src/AcceptAlert.h
207
211
  - src/Authenticate.cpp
208
212
  - src/Authenticate.h
209
213
  - src/Body.h
@@ -233,6 +237,8 @@ files:
233
237
  - src/Execute.h
234
238
  - src/FindCss.cpp
235
239
  - src/FindCss.h
240
+ - src/FindModal.cpp
241
+ - src/FindModal.h
236
242
  - src/FindXpath.cpp
237
243
  - src/FindXpath.h
238
244
  - src/FrameFocus.cpp