leap_salesforce_ui 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65465514f36ec0940f42f0531e837572c823d3c1bddf7a2a230057628af1319c
4
- data.tar.gz: 73e68defaa86dbecdccf8558fcb1e78681f5edd4f82f82ba625d18dfc8aaa096
3
+ metadata.gz: 8dac68f1cd35a89cc7051367715789f511f2bbb3bdf4cd992b62d6b4d775d8db
4
+ data.tar.gz: 9b50e04ed020695d9a94ffa43f84182aa336645cc2ff4e6fb1244a5a7384b2fd
5
5
  SHA512:
6
- metadata.gz: 0dd977fd6623b8a6ef334ede9abe640703a090a6c5586e9dc3aa0f03f15900550eea2e8be05169c3c97f3f012f8df55caaa29dbf39b8ad0d920f91eb174cc0b8
7
- data.tar.gz: 8bbb5669682163a049fa1780ef99a2b5efd6197e5f4d688131eabc9cd0d275e616ca91eb5ace4c71c6f01ec4739129d58c16bf2a6b5cf16851d731a93ac1a5c3
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
@@ -1,3 +1,7 @@
1
+ Version 0.1.3
2
+ * Enhancements
3
+ * Explicitly specify higher version of Watir as minimum which is compatible with Ruby 3
4
+
1
5
  Version 0.1.2
2
6
  * Enhancements
3
7
  * Added Rake task to auto-generate page classes from soql_objects
data/Dockerfile CHANGED
@@ -1,4 +1,5 @@
1
1
  FROM ruby:2.7
2
+ # Issue as of this time with Selenium webdriver remote with Ruby3
2
3
  MAINTAINER Samuel Garratt
3
4
 
4
5
  # Required ruby gems
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
- it "populate form and save" do
38
- account = FactoryBot.create(:account)
39
- CreateContactPage.visit.submit_with({ "First Name" => first_name,
40
- last_name: last_name,
41
- salutation: salutation,
42
- other_street: other_street,
43
- account_id: account.account_name})
44
- contact_id = ViewContactPage.id
45
- @contact = Contact.find(id: contact_id)
46
- expect(@contact.first_name).to eq first_name
47
- expect(@contact.last_name).to eq last_name
48
- expect(@contact.salutation).to eq salutation
49
- expect(@contact.other_street).to eq other_street
50
- expect(@contact.account_id).to eq account.id
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
 
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LeapSalesforceUi
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
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.2
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-02 00:00:00.000000000 Z
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: '0'
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: '0'
41
+ version: 6.17.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: webdrivers
44
44
  requirement: !ruby/object:Gem::Requirement