ops_manager_ui_drivers 1.26.1 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 198b74217e39dbeea952d68de87722c3a931cd7b
4
- data.tar.gz: 994d5da44cae05ade6e86f233fbf7f2c104c367b
3
+ metadata.gz: 1759152579edac973cb280c2739aa124ede9bd99
4
+ data.tar.gz: d9c0e28827ce475a6f50e0bb10bc7af7ae4c055e
5
5
  SHA512:
6
- metadata.gz: 4cf4a2364666c85b9d3f6e099fbd6150bdbbe7737a66ea26a2fa1851596a149cea82ec6982fc0c8cdbaa0769ebcb13dc04c5d60c44051fe85dc08c888ebc3040
7
- data.tar.gz: d81f34948f38dc7d9422f57aab74e13f09525c21bbd749f89994714f4d754933e793297b42a02b0fc680a455550cc33edad6a38861509758b500d27c4f2c60a5
6
+ metadata.gz: 0e9ae544ee237f523f16d0eba6b216d2b4125300d22e9057a1c07c66f24d2b13066931b778bc4104f7eba3093d508d531bf4169d797eba354f2bd624bcbc4dc3
7
+ data.tar.gz: 3a31071e5cbb4b4284bd3f371959cc77ac0ab7bd9e9dbba6f4876aa853804f5aaece61eef401e6a24e64f63bfd11ecef2e980fa075d2319a5109a86f695b94c9
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '1.26.1'
2
+ VERSION = '1.27.0'
3
3
  end
@@ -3,6 +3,43 @@ require 'ops_manager_ui_drivers/version16/setup'
3
3
  module OpsManagerUiDrivers
4
4
  module Version17
5
5
  class Setup < Version16::Setup
6
+ def setup_and_login(user:, password:)
7
+ browser.visit '/setup'
8
+ browser.fill_in 'setup[admin_user_name]', with: user, wait: 4
9
+ browser.fill_in 'setup[admin_password]', with: password
10
+ browser.fill_in 'setup[admin_password_confirmation]', with: password
11
+ browser.fill_in 'setup[decryption_passphrase]', with: password
12
+ browser.fill_in 'setup[decryption_passphrase_confirmation]', with: password
13
+ browser.check 'setup_eula_accepted'
14
+ browser.click_on 'create-setup-action'
15
+
16
+ login(user: user, password: password) unless browser.has_selector?('#main-page-marker', wait: 1)
17
+ end
18
+
19
+ def login(user:, password:)
20
+ Timeout.timeout(150) do
21
+ while browser.current_path.include?('ensure_availability')
22
+ sleep 1
23
+ end
24
+ end
25
+ browser.fill_in 'username', with: user, wait: 4
26
+ browser.fill_in 'password', with: password
27
+ browser.click_on 'Sign in'
28
+
29
+ unless browser.has_selector?('#main-page-marker', wait: 4)
30
+ fail(RuntimeError, "failed to log in as #{user}/#{password}.")
31
+ end
32
+ end
33
+
34
+ def setup_or_login(user:, password:)
35
+ browser.visit '/'
36
+
37
+ if browser.current_path == '/setup'
38
+ setup_and_login(user: user, password: password)
39
+ elsif browser.current_path == '/uaa/login'
40
+ login(user: user, password: password)
41
+ end
42
+ end
6
43
  end
7
44
  end
8
45
  end
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: 1.26.1
4
+ version: 1.27.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: 2015-12-22 00:00:00.000000000 Z
11
+ date: 2015-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport