boq_com_au 0.4.1 → 0.5.0

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: 7dbfa387d610f682d7da5ac4cc759933199a95e07fa2a3ed59a371a81b8fb14c
4
- data.tar.gz: 5fb79aa2173d74a2a5bc5caed23aa36d877fd4addd817625e81637ac1b3eef67
3
+ metadata.gz: 8a6bd6f8191c055420474e1a4b84ae6f47bcf8dd52820bae41af4a7824b8628c
4
+ data.tar.gz: 7571fc67a6a508a8737aca010f804a2d1dc47c3771f553d987f5be5cc7295922
5
5
  SHA512:
6
- metadata.gz: d73852294ffd68b289400f939be9046d7d45037646c0ace02aaab989b92b46097d4d6a84a8bc9857740d7ac06056a8dbf20ab76aa90f0fc3535bf82170d62a5e
7
- data.tar.gz: 36866d193c771d928993c5f9b1000624b827c4ed400470baf57ccadfc8faff4c4d54a4c8ec34afc0c8c9b400652601f08a37b4a35175a6ee276e2d7350814d5f
6
+ metadata.gz: fe1c612be9bfdf6873a902577a89c33c08b0eb9a1e188892b49a600f0a5625eaa49c7f1a459e909767e9d325ca504593d295be81a7351dd04064d55e882407e2
7
+ data.tar.gz: 1877660bd84ca7c351904efc98b17c9618b0f7bbbe7eed7fbacbb2d5ba8aab3dcf75be5dd52d3aac7db867239a734fa23eefd82da5c4da49cb4fbdab7ed9c551
data/CHANGELOG CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## 20261115
4
4
 
5
+ 0.5.0: ~ BoqComAu::Account::PAGE_SELECTORS: /logged_out_xpath/logged_out_selector/, as WebAccount 0.9.0's.
6
+
7
+ 1. ~ boq_com_au.gemspec: webaccount /'~> 0.8'/'~> 0.9'/
8
+ 2. ~ BoqComAu::Account::PAGE_SELECTORS: /logged_out_xpath: '...'/logged_out_selector: {xpath: '...'}/, logged_out_xpath going in WebAccount 0.10.0.
9
+ 3. ~ test/BoqComAu/Account_test.rb: The logged-out selector is BOQ's where none is given, and one set after construction wins over it.
10
+ 4. ~ README.md: The setters win over PAGE_SELECTORS, as the keywords do.
11
+ 5. ~ BoqComAu::VERSION: /0.4.1/0.5.0/
12
+
5
13
  0.4.1: ~ BoqComAu::Account#login and #download_transactions name every argument missing at once, as an ArgumentError.
6
14
 
7
15
  1. + BoqComAu::Account#validate_args
data/README.md CHANGED
@@ -79,9 +79,10 @@ Where BOQ asks for a one-time code after logging on, `login` waits up to 30 seco
79
79
 
80
80
  The selectors were taken from the live site. BOQ's ids are generated, so things are found by their labels and text, and a change to the wording of the site will break it.
81
81
 
82
- Each key of `BoqComAu::Account::PAGE_SELECTORS` is also a keyword of `new`, which wins over BOQ's, so as a login page selector which has changed can be given without waiting for a new version:
82
+ Each key of `BoqComAu::Account::PAGE_SELECTORS` is also a keyword of `new`, and has a setter, either of which wins over BOQ's, so as a selector which has changed can be given without waiting for a new version:
83
83
  ```ruby
84
84
  BoqComAu::Account.new(login_page_submit_button_selector: {id: 'btnLogOn'})
85
+ boq_account.logged_out_selector = {id: 'btnLogOn'}
85
86
  ```
86
87
 
87
88
  The tests cover only what doesn't depend on BOQ's site.
data/boq_com_au.gemspec CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
 
39
39
  spec.dependencies = [
40
40
  ['selenium-webdriver', '>= 4.0'],
41
- ['webaccount', '~> 0.8']
41
+ ['webaccount', '~> 0.9']
42
42
  ]
43
43
 
44
44
  spec.development_dependencies = %w{
@@ -23,7 +23,7 @@ module BoqComAu
23
23
  login_page_password_field_selector: {xpath: '//input[@id=//label[normalize-space()="Password"]/@for]'},
24
24
  login_page_submit_button_selector: {id: 'btnSignIn'},
25
25
  logout_button_selector: {xpath: '//a[contains(translate(normalize-space(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz"), "log off")]'},
26
- logged_out_xpath: '//a[normalize-space()="Log On Again"] | //input[@id="btnSignIn"]'
26
+ logged_out_selector: {xpath: '//a[normalize-space()="Log On Again"] | //input[@id="btnSignIn"]'}
27
27
  }
28
28
 
29
29
  TRANSACTIONS_SELECTORS = {
@@ -2,5 +2,5 @@
2
2
  # BoqComAu::VERSION
3
3
 
4
4
  module BoqComAu
5
- VERSION = '0.4.1'
5
+ VERSION = '0.5.0'
6
6
  end
@@ -164,6 +164,13 @@ describe BoqComAu::Account do
164
164
  account = BoqComAu::Account.new
165
165
  _(account.send(:login_page_username_field_selector)).must_equal(BoqComAu::Account::PAGE_SELECTORS[:login_page_username_field_selector])
166
166
  _(account.send(:logout_button_selector)).must_equal(BoqComAu::Account::PAGE_SELECTORS[:logout_button_selector])
167
+ _(account.logged_out_selector).must_equal({xpath: '//a[normalize-space()="Log On Again"] | //input[@id="btnSignIn"]'})
168
+ end
169
+
170
+ it "uses a selector set after construction over BOQ's" do
171
+ account = BoqComAu::Account.new
172
+ account.logged_out_selector = {id: 'btnLogOn'}
173
+ _(account.logged_out_selector).must_equal({id: 'btnLogOn'})
167
174
  end
168
175
 
169
176
  it "logs in where told to, a keyword winning over BOQ's selector" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boq_com_au
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.8'
32
+ version: '0.9'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.8'
39
+ version: '0.9'
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: minitest
42
42
  requirement: !ruby/object:Gem::Requirement