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 +4 -4
- data/CHANGELOG +8 -0
- data/README.md +2 -1
- data/boq_com_au.gemspec +1 -1
- data/lib/BoqComAu/Account.rb +1 -1
- data/lib/BoqComAu/VERSION.rb +1 -1
- data/test/BoqComAu/Account_test.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a6bd6f8191c055420474e1a4b84ae6f47bcf8dd52820bae41af4a7824b8628c
|
|
4
|
+
data.tar.gz: 7571fc67a6a508a8737aca010f804a2d1dc47c3771f553d987f5be5cc7295922
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
data/lib/BoqComAu/Account.rb
CHANGED
|
@@ -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
|
-
|
|
26
|
+
logged_out_selector: {xpath: '//a[normalize-space()="Log On Again"] | //input[@id="btnSignIn"]'}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
TRANSACTIONS_SELECTORS = {
|
data/lib/BoqComAu/VERSION.rb
CHANGED
|
@@ -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
|
+
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.
|
|
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.
|
|
39
|
+
version: '0.9'
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: minitest
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|