leap_salesforce_ui 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +3 -0
- data/README.md +12 -0
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/exe/leap_salesforce_ui +0 -0
- data/leap_salesforce_ui.gemspec +2 -2
- data/lib/leap_salesforce_ui/login_page.rb +10 -1
- data/lib/leap_salesforce_ui/version.rb +1 -1
- data/lib/leap_salesforce_ui.rb +4 -0
- data/run_tests_when_ready.sh +0 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a32b636aadfb8ad4d0a4cdbbacf3d5be6bd826b6ba68beb87229df3d16c35c9f
|
4
|
+
data.tar.gz: 1fb0bbfcccc439e62971da6c2fa044431f7f3a03aa899b2051be5e2568bfe50f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbd02870870749274f24409c049899773df5080b0af2ecce9f98007ccbee275b3ac69dfcfddb4de5633a81c6ffd6f37bbeb195f496fcc6f3e1b86bf9fa823338
|
7
|
+
data.tar.gz: 4d9e90c2ee97d6f372f9951d15dc5bef78f3b08aef3253a7604cd9b4c31b0cf4bb61858970bb3cbe6877aefdd3879d629c3464b55ee1a4b347aa3dc0c57077bd
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -133,6 +133,18 @@ LeapSalesforce.headless = true
|
|
133
133
|
```
|
134
134
|
|
135
135
|
|
136
|
+
### Helpful commands
|
137
|
+
|
138
|
+
Go to Salesforce instance defined by logging in
|
139
|
+
```ruby
|
140
|
+
LeapSalesforce.browser.goto SoqlHandler.instance_url
|
141
|
+
```
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
|
145
|
+
session = LeapSalesforce::Session.new LeapSalesforce.ui_user, LeapSalesforce.password
|
146
|
+
```
|
147
|
+
|
136
148
|
## Development
|
137
149
|
|
138
150
|
After checking out the repo, run `bin/setup` to install dependencies.
|
data/bin/console
CHANGED
File without changes
|
data/bin/setup
CHANGED
File without changes
|
data/exe/leap_salesforce_ui
CHANGED
File without changes
|
data/leap_salesforce_ui.gemspec
CHANGED
@@ -29,8 +29,8 @@ It reads the Metadata from Salesforce and creates the foundation for UI tests.'
|
|
29
29
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
|
-
spec.add_dependency "leap_salesforce", ">= 1.
|
33
|
-
spec.add_dependency "watir", "6.19"
|
32
|
+
spec.add_dependency "leap_salesforce", ">= 1.1.2"
|
33
|
+
spec.add_dependency "watir", "6.19.1"
|
34
34
|
spec.add_dependency "webdrivers"
|
35
35
|
|
36
36
|
# For more information and examples about making a new gem, checkout our
|
@@ -41,8 +41,17 @@ Go to #{DISABLE_2STEP_URL} to learn how to disable it"
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def login
|
44
|
+
raise "Need to set LeapSalesforce.ui_user" unless LeapSalesforce.ui_user
|
44
45
|
LeapSalesforce.logger.info "Logging in as user '#{LeapSalesforce.ui_user}'"
|
45
|
-
|
46
|
+
if LeapSalesforce.login_through_session
|
47
|
+
browser.goto SoqlHandler.instance_url
|
48
|
+
session = LeapSalesforce::Session.new LeapSalesforce.ui_user, LeapSalesforce.password
|
49
|
+
browser.cookies.add "sid", session.session_id
|
50
|
+
browser.cookies.add "sidClient", session.user_id
|
51
|
+
browser.goto SoqlHandler.instance_url
|
52
|
+
else
|
53
|
+
browser.goto "#{LeapSalesforce.general_url}/?un=#{LeapSalesforce.ui_user}&pw=#{LeapSalesforce.password}"
|
54
|
+
end
|
46
55
|
continue_button = browser.button(id: "thePage:inputForm:continue")
|
47
56
|
if continue_button.exists?
|
48
57
|
browser.checkbox(id: "thePage:inputForm:remember").set
|
data/lib/leap_salesforce_ui.rb
CHANGED
@@ -35,6 +35,8 @@ module LeapSalesforce
|
|
35
35
|
@ui_user = nil
|
36
36
|
# @return [Boolean] Whether to run in headless mode
|
37
37
|
@headless = false
|
38
|
+
# @return [Boolean] Whether to login using session obtained via SOAP
|
39
|
+
@login_through_session = false
|
38
40
|
class << self
|
39
41
|
def browser(test_name = nil)
|
40
42
|
@browser ||= new_browser(test_name)
|
@@ -50,6 +52,8 @@ module LeapSalesforce
|
|
50
52
|
|
51
53
|
# @return [Boolean] Whether to run in headless mode. Default false
|
52
54
|
attr_accessor :headless
|
55
|
+
# @return [Boolean] Whether to login using session obtained via SOAP
|
56
|
+
attr_accessor :login_through_session
|
53
57
|
|
54
58
|
# @param [String, Symbol, Regexp, LeapSalesforce::User] user User or email address of user
|
55
59
|
def ui_user=(user)
|
data/run_tests_when_ready.sh
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leap_salesforce_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IQA
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-01
|
12
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: leap_salesforce
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.
|
20
|
+
version: 1.1.2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.
|
27
|
+
version: 1.1.2
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: watir
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 6.19.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 6.19.1
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: webdrivers
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.2.
|
131
|
+
rubygems_version: 3.2.3
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Helps with setting up integrated automated test frameworks against Salesforce
|