ops_manager_ui_drivers 2.18.0 → 2.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7b72604a45307809ab3aa64c13eb87aa019a10e
4
- data.tar.gz: e8f6c14534cb22c2f29623ee6aa30642905c1798
3
+ metadata.gz: 8e5ecc135ac4b2b7f1c90b9968a66b88bf6e80ef
4
+ data.tar.gz: 795088ef88ecebbdb2682fa414e4da2758d0fe95
5
5
  SHA512:
6
- metadata.gz: 030d8c3969f61f1e3df0473fd4845e8c30ceca70122084bfb5ce5b931d77e514f250021ac2b3b3eed3962462f59497676d03c816fee8281a9ae6a689f0cfd074
7
- data.tar.gz: 7cc4f3d40c8a3267cb1588ff651e4c76f5e60bb794c27b53a630071a8f4ecc102fa8b4ce42fc9f5a52a358292c59e2e73c9b5879649b5ca82965e87e2d82b9de
6
+ metadata.gz: 9935b1bc898f47ba6398ed653f459b595407f31e60975db0e4bf82793ad988602868532164839eb002f555f3c89c3abf00bb940ff446d505f26022e5b1a2627c
7
+ data.tar.gz: 9408d18557bdcd6c3a5ba56acd5ae12d64989cfef16bb4e4afb7a5e80a4a5afc8ef64d66472f422b0cb94c2439ba8d24065a53a72095c5a21a3b9441e322b338
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.18.0'
2
+ VERSION = '2.19.0'
3
3
  end
@@ -13,9 +13,9 @@ module OpsManagerUiDrivers
13
13
  @browser.click_on "show-#{form_name}-action"
14
14
  end
15
15
 
16
- def save_form
16
+ def save_form(allowed_errors=[])
17
17
  @browser.click_on 'Save'
18
- @browser.expect(@browser.page).to @browser.have_css('.flash-message.success')
18
+ !@browser.all('.flash-message.success').empty? || only_has_allowed_verification_errors(allowed_errors)
19
19
  end
20
20
 
21
21
  def set_fields(fields)
@@ -26,6 +26,21 @@ module OpsManagerUiDrivers
26
26
 
27
27
  private
28
28
 
29
+ def only_has_allowed_verification_errors(allowed_errors)
30
+ flash_errors = @browser.all('.flash-message.error')
31
+ unexpected_errors = []
32
+
33
+ if flash_errors.any?
34
+ unexpected_errors = flash_errors.reject do |error|
35
+ allowed_errors.select do |expected_error|
36
+ error.text =~ expected_error
37
+ end.any?
38
+ end
39
+ end
40
+
41
+ unexpected_errors.empty?
42
+ end
43
+
29
44
  def set_field(field, value)
30
45
  last_field(field).set(value)
31
46
  end
@@ -39,7 +39,7 @@ module OpsManagerUiDrivers
39
39
  'gateway' => gateway,
40
40
  'reserved_ip_ranges' => reserved_ip_ranges,
41
41
  )
42
- @bosh_product_form_section.save_form
42
+ @bosh_product_form_section.save_form([/Cannot reach gateway/])
43
43
  end
44
44
 
45
45
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_manager_ui_drivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.18.0
4
+ version: 2.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport