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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b5f251c39643a21857de6fe166d4bd7e7b745a124447c8902e1c37b668e9505
4
- data.tar.gz: 0ede5e19a5b0ad7bde0c7225839b3491befddf121f841a814553b7f61b4ebff4
3
+ metadata.gz: a32b636aadfb8ad4d0a4cdbbacf3d5be6bd826b6ba68beb87229df3d16c35c9f
4
+ data.tar.gz: 1fb0bbfcccc439e62971da6c2fa044431f7f3a03aa899b2051be5e2568bfe50f
5
5
  SHA512:
6
- metadata.gz: 74c998b5c42ec3d31f3c4e730c294b05cbcaae389a7be5dc9c8425f0a8f994618694b1e4fc0274649705fa0ab4d558e159c69a133907a4de5ae3521a7511fffb
7
- data.tar.gz: 5604e708d5d9c28cf03d797cbff9373e33e4481e69b99ebbee961df091eb30f0c8a97ae504bea2025995b4edf43f979002e8fd75d1e513110a4d43a7cd077065
6
+ metadata.gz: dbd02870870749274f24409c049899773df5080b0af2ecce9f98007ccbee275b3ac69dfcfddb4de5633a81c6ffd6f37bbeb195f496fcc6f3e1b86bf9fa823338
7
+ data.tar.gz: 4d9e90c2ee97d6f372f9951d15dc5bef78f3b08aef3253a7604cd9b4c31b0cf4bb61858970bb3cbe6877aefdd3879d629c3464b55ee1a4b347aa3dc0c57077bd
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ Version 0.1.9
2
+ * Ability to login through SOAP session with the LeapSalesforce.login_through_session parameter
3
+
1
4
  Version 0.1.8
2
5
  * Fixed Watir version at 6.19. Need to update syntax to work with latest version
3
6
 
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
File without changes
@@ -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.0.3"
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
- browser.goto "#{LeapSalesforce.general_url}/?un=#{LeapSalesforce.ui_user}&pw=#{LeapSalesforce.password}"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LeapSalesforceUi
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
@@ -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)
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.8
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-17 00:00:00.000000000 Z
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.0.3
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.0.3
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: '6.19'
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: '6.19'
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.32
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