leap_salesforce_ui 0.1.9 → 0.2.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
  SHA256:
3
- metadata.gz: a32b636aadfb8ad4d0a4cdbbacf3d5be6bd826b6ba68beb87229df3d16c35c9f
4
- data.tar.gz: 1fb0bbfcccc439e62971da6c2fa044431f7f3a03aa899b2051be5e2568bfe50f
3
+ metadata.gz: 86c39389d370e267d626261bc6b31d1e9507188f2a6ec1419a7abff1e1890372
4
+ data.tar.gz: fcf1b213f877ca3c7eab4edf1ce80e91b1be3eed46f411f6e8fd2adc767548b2
5
5
  SHA512:
6
- metadata.gz: dbd02870870749274f24409c049899773df5080b0af2ecce9f98007ccbee275b3ac69dfcfddb4de5633a81c6ffd6f37bbeb195f496fcc6f3e1b86bf9fa823338
7
- data.tar.gz: 4d9e90c2ee97d6f372f9951d15dc5bef78f3b08aef3253a7604cd9b4c31b0cf4bb61858970bb3cbe6877aefdd3879d629c3464b55ee1a4b347aa3dc0c57077bd
6
+ metadata.gz: 91701a2ec7d396345b8633edf1d25f2d9e05eb887dba96fdb9f8b9c488ebfc9331c7c4fb8fbd2aa3b87942172591f27b210278cf815bf13098c8e836cbb561b4
7
+ data.tar.gz: a04f7e04e7e34d4a29ea1667fa38fc9c6b3c60f8e2776dac1f077a3fbd4ea6e4cb552c98fb55dec6811e5eb6d439151acc7c7dfa75a4bffb683ccbbf70abd7ae
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.2.0
2
+ * Pass in security token defined by leap_salesforce with convention ENV['KEY'_token] to SOAP
3
+ session login
4
+
1
5
  Version 0.1.9
2
6
  * Ability to login through SOAP session with the LeapSalesforce.login_through_session parameter
3
7
 
data/README.md CHANGED
@@ -100,7 +100,7 @@ RSpec.describe "Creating record" do
100
100
  end
101
101
  ```
102
102
 
103
- One doesn’t have to identify how to recognise first_name, last_name, etc.
103
+ One does not have to identify how to recognise first_name, last_name, etc.
104
104
  From the metadata it works out what kind of field (textfield, textarea, reference) and then
105
105
  finds the corresponding label and uses that to fill in the field.
106
106
 
@@ -132,6 +132,9 @@ To run tests in headless mode, set headless mode to true.
132
132
  LeapSalesforce.headless = true
133
133
  ```
134
134
 
135
+ ### Authentication
136
+ If IP address for user profile is not allowed you will need to use a security token. See
137
+ leap_salesforce for how to set this for each user's key through environment variables.
135
138
 
136
139
  ### Helpful commands
137
140
 
@@ -140,9 +143,11 @@ Go to Salesforce instance defined by logging in
140
143
  LeapSalesforce.browser.goto SoqlHandler.instance_url
141
144
  ```
142
145
 
146
+ Login through SOAP session to get information for browser
143
147
  ```ruby
144
-
145
- session = LeapSalesforce::Session.new LeapSalesforce.ui_user, LeapSalesforce.password
148
+ user = LeapSalesforce::Users.where username: LeapSalesforce.ui_user
149
+ session = LeapSalesforce::Session.new user.username, LeapSalesforce.password,
150
+ user.security_token
146
151
  ```
147
152
 
148
153
  ## Development
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "config/credentials/token" if File.exist? 'config/credentials/token.rb'
3
4
  require "bundler/gem_tasks"
4
5
  require "rspec/core/rake_task"
5
6
  require "leap_salesforce/rake"
@@ -29,7 +29,7 @@ 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.1.2"
32
+ spec.add_dependency "leap_salesforce", ">= 1.2.1"
33
33
  spec.add_dependency "watir", "6.19.1"
34
34
  spec.add_dependency "webdrivers"
35
35
 
@@ -45,7 +45,8 @@ Go to #{DISABLE_2STEP_URL} to learn how to disable it"
45
45
  LeapSalesforce.logger.info "Logging in as user '#{LeapSalesforce.ui_user}'"
46
46
  if LeapSalesforce.login_through_session
47
47
  browser.goto SoqlHandler.instance_url
48
- session = LeapSalesforce::Session.new LeapSalesforce.ui_user, LeapSalesforce.password
48
+ user = LeapSalesforce::Users.where username: LeapSalesforce.ui_user
49
+ session = LeapSalesforce::Session.new user.username, LeapSalesforce.password, user.security_token
49
50
  browser.cookies.add "sid", session.session_id
50
51
  browser.cookies.add "sidClient", session.user_id
51
52
  browser.goto SoqlHandler.instance_url
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LeapSalesforceUi
4
- VERSION = "0.1.9"
4
+ VERSION = "0.2.0"
5
5
  end
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.9
4
+ version: 0.2.0
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-02-01 00:00:00.000000000 Z
12
+ date: 2022-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: leap_salesforce
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 1.1.2
20
+ version: 1.2.1
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.1.2
27
+ version: 1.2.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: watir
30
30
  requirement: !ruby/object:Gem::Requirement