leap_salesforce_ui 0.1.6 → 0.1.7

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: 1d7e63743b865e1a4fd706abeb9772fa5726a6304c336fe40dd6f32a455119b9
4
- data.tar.gz: da6bfe38c4f2479a0ddb06e748ff262ac80d45fe9872839d115c0ccdb1eda758
3
+ metadata.gz: 10d36f660f1fd79ec05c6dcf5a0571b8b9394154ee59bece411722672045d9cc
4
+ data.tar.gz: e4bb12986774537a04ec55759e3005da3e54b1825acd62ec4e0251e8fdbabd4c
5
5
  SHA512:
6
- metadata.gz: 9c0e05222bdb5c9c86f4367fc50a5e0bbb381d21329e7588cc4760011d636b4526aebe2e84db0ccf6ae60441186f673b6df70a73a1c370b3cbb54191d19f84c8
7
- data.tar.gz: 78456a3a7afcd73a3e7b779843f17485f45b6c11b406038fa1ec43bdf2b8aee1b9cb6bef4fa66796f44c32f571591e6db1ce7b8b8f636d2064c3383dc85ddb6d
6
+ metadata.gz: 810cd99d1b6d9ff927cba94c9c680267c5005801210b5e9287229a897aa305befdb506c05cec90f55fb8dc2ae1949b47a5f33cb2855c0d5b417e5c20b2686f1f
7
+ data.tar.gz: cab59fba240bdad1a26b86166339ed1caa4e46cc6bacca7c7e2502b387c6343e3d8ba710c523c4cd25c6243fb085fd33788760ccb1e1c826d2c2cdb61fddd603
data/README.md CHANGED
@@ -125,6 +125,14 @@ Follow other examples in `spec` to build tests using the auto-generated classes.
125
125
  unless run from an IP address that your Salesforce Org trusts. Many shared CI environments have runners that would
126
126
  be hard to whitelist as the address is dynamic.
127
127
 
128
+ ### Options
129
+
130
+ To run tests in headless mode, set headless mode to true.
131
+ ```ruby
132
+ LeapSalesforce.headless = true
133
+ ```
134
+
135
+
128
136
  ## Development
129
137
 
130
138
  After checking out the repo, run `bin/setup` to install dependencies.
@@ -55,7 +55,8 @@ module LeapSalesforce
55
55
  def set_text_area(label, value)
56
56
  LeapSalesforce.logger.info "Setting text area, label '#{label}' with '#{value}'"
57
57
  field_transaction label, value do
58
- form.textarea(xpath: "//label[contains(.,'#{label}')]//following-sibling::textarea").set value
58
+ text_area = form.textarea(xpath: "//lightning-textarea[./label[contains(.,'#{label}')]]//following-sibling::div/textarea")
59
+ text_area.set value
59
60
  end
60
61
  end
61
62
 
@@ -88,11 +89,15 @@ module LeapSalesforce
88
89
  def set_picklist(label, value)
89
90
  LeapSalesforce.logger.info "Setting picklist, label '#{label}' with '#{value}'"
90
91
  field_transaction label, value do
91
- dropdown = form.link(xpath: "//*[./*[text()='#{label}']]//following-sibling::div//a")
92
+ dropdown = form.text_field(xpath: "//*[./*[text()='#{label}']]//following-sibling::div//input")
93
+ dropdown_id = dropdown.attribute "id"
94
+ LeapSalesforce.logger.debug "Using dropdown id: #{dropdown_id}"
92
95
  dropdown.focus
93
96
  sleep 0.5
94
97
  dropdown.click
95
- browser.link(xpath: ".//div[contains(@class, 'select-options')]//a[contains(.,'#{value}')]").click
98
+ has_value = "@data-value='#{value}'"
99
+ in_dropdown = "starts-with(@data-item-id, '#{dropdown_id}')"
100
+ browser.element(xpath: ".//lightning-base-combobox-item[#{has_value} and #{in_dropdown}]").click
96
101
  end
97
102
  self
98
103
  end
@@ -105,7 +110,7 @@ module LeapSalesforce
105
110
  field_transaction label, value do
106
111
  search_field = browser.text_field(xpath: "//label[contains(.,'#{ref_label}')]//following-sibling::div[1]//input")
107
112
  search_field.set search_val
108
- browser.div(xpath: "//div[contains(@data-aura-class,'forceSearchInputLookupDesktopActionItem') and contains(., 'Search')]").click
113
+ browser.element(xpath: ".//lightning-base-combobox-item[starts-with(.,'SearchShow')]").click
109
114
  browser.link(xpath: "//div[contains(@class,'searchScroller')]//a[contains(.,'#{search_val}')]").click
110
115
  end
111
116
  self
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LeapSalesforceUi
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.7"
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.6
4
+ version: 0.1.7
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: 2021-02-23 00:00:00.000000000 Z
12
+ date: 2021-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: leap_salesforce