boq_com_au 0.3.0 → 0.4.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 +11 -0
- data/README.md +5 -0
- data/boq_com_au.gemspec +1 -1
- data/lib/BoqComAu/Account.rb +0 -4
- data/lib/BoqComAu/VERSION.rb +1 -1
- data/test/BoqComAu/Account_test.rb +10 -3
- 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: 169a4211f870a165121c2ac49ec27b58346c7f28b0ecc24bcafbb9d494c74877
|
|
4
|
+
data.tar.gz: fecb838576a38a082066462790e4167a6d58eaaf252389a5d75849130a8c66f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4951d8080e25d20cc968437cd2009e39fb87b22b961bb44c7442742ab32d2c84e7dcf1a0bb14b0363a3b8076eb85bbcf87b6276ec7a46ffa96fbb9c3f396aca4
|
|
7
|
+
data.tar.gz: 58615e334a814d0ac6a32c226d78c6cde168cce65e3fcc1bc97e9ead3af68f0d6bfa6bbf4477cdad633aeb6fe8a147ac631915640b37d680188dbaae921884a5
|
data/CHANGELOG
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# boq_com_au/CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 20261115
|
|
4
|
+
|
|
5
|
+
0.4.0: - BoqComAu::Account#initialize: Now uses superclass WebAccount.
|
|
6
|
+
|
|
7
|
+
1. ~ boq_com_au.gemspec: webaccount /'~> 0.7'/'~> 0.8'/
|
|
8
|
+
2. - BoqComAu::Account#initialize, WebAccount's reading PAGE_SELECTORS itself.
|
|
9
|
+
3. ~ test/BoqComAu/Account_test.rb: A login page URL and a selector given win over BOQ's, the rest staying BOQ's; /logs in to BOQ, whatever else is passed to WebAccount/uses BOQ's selectors where none is given/.
|
|
10
|
+
4. ~ README.md: The keywords of new win over PAGE_SELECTORS.
|
|
11
|
+
5. ~ BoqComAu::VERSION: /0.3.0/0.4.0/
|
|
12
|
+
|
|
13
|
+
|
|
3
14
|
## 20261111
|
|
4
15
|
|
|
5
16
|
0.3.0: ~ BoqComAu::Account uses WebAccount 0.7.0's browser options and download waiting, so as it runs in Firefox as well as Chrome; /chrome_profile_directory:/profile_directory:/.
|
data/README.md
CHANGED
|
@@ -79,6 +79,11 @@ 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:
|
|
83
|
+
```ruby
|
|
84
|
+
BoqComAu::Account.new(login_page_submit_button_selector: {id: 'btnLogOn'})
|
|
85
|
+
```
|
|
86
|
+
|
|
82
87
|
The tests cover only what doesn't depend on BOQ's site.
|
|
83
88
|
|
|
84
89
|
## Contributing
|
data/boq_com_au.gemspec
CHANGED
data/lib/BoqComAu/Account.rb
CHANGED
|
@@ -59,10 +59,6 @@ module BoqComAu
|
|
|
59
59
|
|
|
60
60
|
private
|
|
61
61
|
|
|
62
|
-
def initialize(username: nil, password: nil, **web_account_args)
|
|
63
|
-
super(username: username, password: password, **web_account_args, **PAGE_SELECTORS)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
62
|
# page interaction
|
|
67
63
|
|
|
68
64
|
def chosen_list(select_element)
|
data/lib/BoqComAu/VERSION.rb
CHANGED
|
@@ -137,11 +137,18 @@ describe BoqComAu::Account do
|
|
|
137
137
|
_{BoqComAu::Account.new(chrome_profile_directory: '~/profiles/boq')}.must_raise(ArgumentError)
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
-
it "
|
|
141
|
-
account = BoqComAu::Account.new
|
|
142
|
-
_(account.send(:
|
|
140
|
+
it "uses BOQ's selectors where none is given" do
|
|
141
|
+
account = BoqComAu::Account.new
|
|
142
|
+
_(account.send(:login_page_username_field_selector)).must_equal(BoqComAu::Account::PAGE_SELECTORS[:login_page_username_field_selector])
|
|
143
143
|
_(account.send(:logout_button_selector)).must_equal(BoqComAu::Account::PAGE_SELECTORS[:logout_button_selector])
|
|
144
144
|
end
|
|
145
|
+
|
|
146
|
+
it "logs in where told to, a keyword winning over BOQ's selector" do
|
|
147
|
+
account = BoqComAu::Account.new(login_page_url: 'https://test.example.com/logon', logout_button_selector: {id: 'logoff'})
|
|
148
|
+
_(account.send(:login_page_url)).must_equal('https://test.example.com/logon')
|
|
149
|
+
_(account.send(:logout_button_selector)).must_equal({id: 'logoff'})
|
|
150
|
+
_(account.send(:login_page_username_field_selector)).must_equal(BoqComAu::Account::PAGE_SELECTORS[:login_page_username_field_selector])
|
|
151
|
+
end
|
|
145
152
|
end
|
|
146
153
|
|
|
147
154
|
describe "#dates" 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.4.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.8'
|
|
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.8'
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: minitest
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|