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 +4 -4
- data/README.md +8 -0
- data/lib/leap_salesforce_ui/form_filler.rb +9 -4
- data/lib/leap_salesforce_ui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10d36f660f1fd79ec05c6dcf5a0571b8b9394154ee59bece411722672045d9cc
|
4
|
+
data.tar.gz: e4bb12986774537a04ec55759e3005da3e54b1825acd62ec4e0251e8fdbabd4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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")
|
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.
|
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
|
-
|
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.
|
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
|
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.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-
|
12
|
+
date: 2021-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: leap_salesforce
|