nab_com_au 0.3.1 → 0.4.1
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 +18 -0
- data/lib/NabComAu/Account.rb +1 -14
- data/lib/NabComAu/VERSION.rb +1 -1
- data/nab_com_au.gemspec +1 -1
- data/test/NabComAu/Account_test.rb +8 -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: 7b939e4b05d583b2401420aa2ec0f9892b676e86d354bd5d68693b441602bb8e
|
|
4
|
+
data.tar.gz: 34d1526490aca289a25a15a6947332c2a06a7999888d2bc8c07ed5299c40e854
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b43898762779882bc09199984c4e24203d079419fd31b89189d7679d524549f1a76427e06c668afbf2ae5e8c21a260542889933bb934cb4491b3033698effdcb
|
|
7
|
+
data.tar.gz: d3e050d3ffbd9893389db986cd8672160b58d2d35cd40a69c480d338bddfa67d847185f119bee44a2f177d2b8a405596bea45aa50e2dd17e9f66629d46b07b9c
|
data/CHANGELOG
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
# nab_com_au/CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 20261116
|
|
4
|
+
|
|
5
|
+
0.4.1: - NabComAu::Account#validate_args: Now uses superclass WebAccount's.
|
|
6
|
+
|
|
7
|
+
1. - NabComAu::Account#validate_args, webaccount 0.10's being the same.
|
|
8
|
+
2. ~ nab_com_au.gemspec: webaccount /'~> 0.9'/'~> 0.10'/
|
|
9
|
+
3. ~ test/NabComAu/Account_test.rb: That validate_args is WebAccount's is tested.
|
|
10
|
+
4. ~ NabComAu::VERSION: /0.4.0/0.4.1/
|
|
11
|
+
|
|
12
|
+
|
|
3
13
|
## 20261115
|
|
4
14
|
|
|
15
|
+
0.4.0: ~ NabComAu::Account::PAGE_SELECTORS: /logged_out_xpath/logged_out_selector/, NAB's logged-out notice, upon webaccount 0.9.
|
|
16
|
+
|
|
17
|
+
1. ~ NabComAu::Account::PAGE_SELECTORS: logged_out_xpath: '' is replaced by logged_out_selector:, matching NAB's "You have been successfully logged out." notice.
|
|
18
|
+
2. ~ nab_com_au.gemspec: webaccount /'~> 0.8'/'~> 0.9'/
|
|
19
|
+
3. ~ test/NabComAu/Account_test.rb: The logged-out selector is tested.
|
|
20
|
+
4. ~ NabComAu::VERSION: /0.3.1/0.4.0/
|
|
21
|
+
|
|
22
|
+
|
|
5
23
|
0.3.1: ~ NabComAu::Account#login: Names every missing argument at once, by validate_args().
|
|
6
24
|
|
|
7
25
|
1. ~ NabComAu::Account#login: validate_args(username:, password:), in place of raising upon each in turn.
|
data/lib/NabComAu/Account.rb
CHANGED
|
@@ -19,7 +19,7 @@ module NabComAu
|
|
|
19
19
|
login_page_password_field_selector: {id: 'password'},
|
|
20
20
|
login_page_submit_button_selector: {xpath: "//button[contains(text(), 'Login')]"},
|
|
21
21
|
logout_button_selector: {id: 'logoutButton'},
|
|
22
|
-
|
|
22
|
+
logged_out_selector: {xpath: "//*[contains(text(), 'You have been successfully logged out.')]"}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
attr_writer :driver
|
|
@@ -62,18 +62,5 @@ module NabComAu
|
|
|
62
62
|
transfer.driver = driver
|
|
63
63
|
transfer.pay
|
|
64
64
|
end
|
|
65
|
-
|
|
66
|
-
private
|
|
67
|
-
|
|
68
|
-
def validate_args(args)
|
|
69
|
-
missing_args = []
|
|
70
|
-
args.each do |arg_name, value|
|
|
71
|
-
missing_args << arg_name unless value
|
|
72
|
-
end
|
|
73
|
-
return if missing_args.empty?
|
|
74
|
-
aggregate_error = missing_args.join(', ')
|
|
75
|
-
copula = missing_args.count > 1 ? 'are' : 'is'
|
|
76
|
-
raise ArgumentError, "#{aggregate_error} #{copula} missing."
|
|
77
|
-
end
|
|
78
65
|
end
|
|
79
66
|
end
|
data/lib/NabComAu/VERSION.rb
CHANGED
data/nab_com_au.gemspec
CHANGED
|
@@ -31,6 +31,7 @@ describe NabComAu::Account do
|
|
|
31
31
|
_(account.send(:login_page_password_field_selector)).must_equal({id: 'password'})
|
|
32
32
|
_(account.send(:login_page_submit_button_selector)).must_equal({xpath: "//button[contains(text(), 'Login')]"})
|
|
33
33
|
_(account.send(:logout_button_selector)).must_equal({id: 'logoutButton'})
|
|
34
|
+
_(account.logged_out_selector).must_equal({xpath: "//*[contains(text(), 'You have been successfully logged out.')]"})
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
it "gives way to a keyword given to new()" do
|
|
@@ -61,6 +62,13 @@ describe NabComAu::Account do
|
|
|
61
62
|
end
|
|
62
63
|
end
|
|
63
64
|
|
|
65
|
+
describe "#validate_args" do
|
|
66
|
+
it "is WebAccount's" do
|
|
67
|
+
_(NabComAu::Account.instance_method(:validate_args).owner).must_equal WebAccount
|
|
68
|
+
_(NabComAu::Bpay.instance_method(:validate_args).owner).must_equal WebAccount
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
64
72
|
describe "#driver=" do
|
|
65
73
|
it "is the browser driven, none being started" do
|
|
66
74
|
driver = untouchable_driver
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nab_com_au
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.1
|
|
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.10'
|
|
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.10'
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: minitest
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|