leap_salesforce_ui 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +1 -0
- data/ChangeLog +4 -0
- data/Dockerfile +1 -0
- data/README.md +31 -14
- data/leap_salesforce_ui.gemspec +1 -1
- data/lib/leap_salesforce_ui.rb +2 -1
- data/lib/leap_salesforce_ui/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dac68f1cd35a89cc7051367715789f511f2bbb3bdf4cd992b62d6b4d775d8db
|
4
|
+
data.tar.gz: 9b50e04ed020695d9a94ffa43f84182aa336645cc2ff4e6fb1244a5a7384b2fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a31aa4579890235a69dee8192f17f7bfc74867ba23f0d0b9f10e69f41ab0c64973d1a280e7646f72f77c7be3f836746089cb28456e91342d2f4d27e7a4efc3eb
|
7
|
+
data.tar.gz: 885dcb0b1df4df2b4efd76bc98bc2bf7370ef0a137d83d141d2f3bd757007b0474c027245fc88f679c6da666cde2f0323179a0be50937fd4a22708bb4eaa0396
|
data/.gitlab-ci.yml
CHANGED
@@ -11,6 +11,7 @@ test:
|
|
11
11
|
script:
|
12
12
|
- apk add docker-compose
|
13
13
|
- docker-compose version
|
14
|
+
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
14
15
|
- docker pull --quiet elgalu/selenium:3.141.59-p37 # Explicitly pull selenium image with working version
|
15
16
|
- docker-compose up --abort-on-container-exit --exit-code-from test
|
16
17
|
artifacts:
|
data/ChangeLog
CHANGED
data/Dockerfile
CHANGED
data/README.md
CHANGED
@@ -29,25 +29,42 @@ Setup `leap_salesforce` with `leap_salesforce init` and use the retrospective ra
|
|
29
29
|
Add the line `require 'leap_salesforce_ui/rake'` to your `Rakefile`. Then run the Rake task `rake leaps:create_poms`
|
30
30
|
which will generate page objects based upon the `soql_objects`
|
31
31
|
|
32
|
+
Set the current UI user to be used with the `LeapSalesforce.ui_user` attribute.
|
33
|
+
|
34
|
+
E.g
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
LeapSalesforce.ui_user = 'test.user@salesforce.com'
|
38
|
+
```
|
39
|
+
|
40
|
+
See [leap salesforce test users section](https://gitlab.com/leap-dojo/leap_salesforce#test-users)
|
41
|
+
for details on ways to set test users.
|
42
|
+
|
32
43
|
### Populate form using label in metadata
|
33
44
|
|
34
45
|
Following is a walk through of one of the tests
|
35
46
|
|
36
47
|
```ruby
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
RSpec.describe "Creating record" do
|
49
|
+
let(:first_name) { Faker::Name.first_name }
|
50
|
+
let(:last_name) { Faker::Name.last_name }
|
51
|
+
let(:salutation) { Contact::Salutation.sample }
|
52
|
+
let(:other_street) { Faker::Address.full_address }
|
53
|
+
it "populate form and save" do
|
54
|
+
account = FactoryBot.create(:account)
|
55
|
+
CreateContactPage.visit.submit_with({ "First Name" => first_name,
|
56
|
+
last_name: last_name,
|
57
|
+
salutation: salutation,
|
58
|
+
other_street: other_street,
|
59
|
+
account_id: account.account_name })
|
60
|
+
contact_id = ViewContactPage.id
|
61
|
+
@contact = Contact.find(id: contact_id)
|
62
|
+
expect(@contact.first_name).to eq first_name
|
63
|
+
expect(@contact.last_name).to eq last_name
|
64
|
+
expect(@contact.salutation).to eq salutation
|
65
|
+
expect(@contact.other_street).to eq other_street
|
66
|
+
expect(@contact.account_id).to eq account.id
|
67
|
+
end
|
51
68
|
end
|
52
69
|
```
|
53
70
|
|
data/leap_salesforce_ui.gemspec
CHANGED
@@ -30,7 +30,7 @@ It reads the Metadata from Salesforce and creates the foundation for UI tests.'
|
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
32
|
spec.add_dependency "leap_salesforce", ">= 1.0.3"
|
33
|
-
spec.add_dependency "watir"
|
33
|
+
spec.add_dependency "watir", ">= 6.17.0"
|
34
34
|
spec.add_dependency "webdrivers"
|
35
35
|
|
36
36
|
# For more information and examples about making a new gem, checkout our
|
data/lib/leap_salesforce_ui.rb
CHANGED
@@ -13,6 +13,7 @@ require_relative "leap_salesforce_ui/update_page"
|
|
13
13
|
page_obj_folder = File.join(LeapSalesforce.lib_folder, "page_objects")
|
14
14
|
require_all page_obj_folder if Dir.exist? page_obj_folder
|
15
15
|
|
16
|
+
# @return [Hash]
|
16
17
|
def zalenium_args(feature_name, scenario)
|
17
18
|
args = { timeout: 120, url: ENV["WEBDRIVER_URL"], name: "Scenario: #{scenario} #{Time.now}",
|
18
19
|
'zal:build': "Feature: #{feature_name}" }
|
@@ -58,7 +59,7 @@ module LeapSalesforce
|
|
58
59
|
def new_browser(test_name = nil)
|
59
60
|
if ENV["WEBDRIVER_URL"]
|
60
61
|
# TODO: Get working on Ruby 3
|
61
|
-
Watir::Browser.new :chrome, **zalenium_args("LeapSalesforce", test_name || "Test")
|
62
|
+
Watir::Browser.new :chrome, { **zalenium_args("LeapSalesforce", test_name || "Test") }
|
62
63
|
else
|
63
64
|
Watir::Browser.new
|
64
65
|
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.
|
4
|
+
version: 0.1.3
|
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-
|
12
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: leap_salesforce
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 6.17.0
|
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.17.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: webdrivers
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|