avmtrf1-tools 0.42.1 → 0.42.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8edc125a20024cc7c0bf39c14423413e13dd542ac881bc9f0a44fcdf69c8a1d
4
- data.tar.gz: 23cd18c67da13c75918efa0fefd44255f06104140d59f3cd646811db46054361
3
+ metadata.gz: b45258f2a26fa84f4cd260b0fb7a9d3c7f9fee7ee7c6eeb68cb6d38ff5f9da83
4
+ data.tar.gz: '048f5a5d7470fee5e367564d8a659ca4afdc3fd7ef304bcd7f35d700f19005c2'
5
5
  SHA512:
6
- metadata.gz: abed68ad5068fb1e0e56d8dd3b59c954490d27dbc7208e63f374f2887becc5abff754d05337edd5307c14c47cd4ae72cabbda6784e85586cb854f062bad5cb8a
7
- data.tar.gz: cd53c79fa8218859a66660679985baec4c117f5eee8bbc1e4286377699c001b776e759170d00a31493b0a2509f8b374dd37f7c96cc577318f8e67d81aa30d00f
6
+ metadata.gz: e73b7fa5b3e73226e44d905cfbbe7a1968576f5d8aff4b86ca378ebeb5c80c3dbd78584206c57241d747e2f7411fd5cc301212328f1782caeeea752fe9496fa5
7
+ data.tar.gz: 398603198d52759c0b4498998328334064cfabda33565832f5d13f3944b8cac62eb05c8afa23f83d1cf90d759218f166f44fde5a27b69699a0b9d9a8f0b15c76
@@ -30,15 +30,15 @@ module Avmtrf1
30
30
  end
31
31
 
32
32
  def fill_username
33
- element_send_keys('LoginUserPassword_auth_username', parent.username)
33
+ element_send_keys('sg_username_input', parent.username)
34
34
  end
35
35
 
36
36
  def fill_password
37
- element_send_keys('LoginUserPassword_auth_password', parent.password)
37
+ element_send_keys('sg_password_input', parent.password)
38
38
  end
39
39
 
40
40
  def click_login_button
41
- session.wait_for_element(id: 'UserCheck_Login_Button_span').click
41
+ session.wait_for_element(id: 'sg_login_button').click
42
42
  end
43
43
 
44
44
  def element_send_keys(element_id, text)
@@ -47,8 +47,8 @@ module Avmtrf1
47
47
 
48
48
  def wait_for_result_page
49
49
  session.wait.until do
50
- element = session.find_element(id: 'usercheck_title_div')
51
- element && element.text == 'Network Access Granted'
50
+ element = session.find_element(id: 'sg_login_button')
51
+ element && element != ::Avmtrf1::CheckPoint::Session::LOGGED_TITLE_TEXT
52
52
  end
53
53
  end
54
54
  end
@@ -10,20 +10,20 @@ module Avmtrf1
10
10
  enable_simple_cache
11
11
 
12
12
  ROOT_URL = 'https://cp.trf1.jus.br'
13
- LOGIN_URL = "#{ROOT_URL}/connect/PortalMain"
14
- LOGGED_TITLE_TEXT = 'Network Access Granted'
13
+ LOGIN_URL = "#{ROOT_URL}/"
14
+ LOGGED_TITLE_TEXT = 'Re-Authenticate'
15
15
 
16
16
  class << self
17
17
  def by_ad_user(ad_user, driver_options = {})
18
18
  new(
19
- ad_user.username_with_domain,
19
+ ad_user.username,
20
20
  ad_user.password,
21
21
  driver_options
22
22
  )
23
23
  end
24
24
 
25
25
  def by_default_ad_user(driver_options = {})
26
- by_ad_user(::Avmtrf1.ad_user, driver_options)
26
+ by_ad_user(::Avmtrf1.ad_user, driver_options.merge(driver: :firefox))
27
27
  end
28
28
  end
29
29
 
@@ -41,7 +41,7 @@ module Avmtrf1
41
41
  def title_text
42
42
  result_text = nil
43
43
  session.wait.until do
44
- element = session.find_element(id: 'usercheck_title_div')
44
+ element = session.find_element(id: 'sg_login_button')
45
45
  return false unless element
46
46
 
47
47
  result_text = element.text.strip
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avmtrf1
4
4
  module Tools
5
- VERSION = '0.42.1'
5
+ VERSION = '0.42.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avmtrf1-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.42.1
4
+ version: 0.42.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-08 00:00:00.000000000 Z
11
+ date: 2024-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-selenium