From 9ab64ae6b97f54846ff159aa5fbf4b7bf565fb22 Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Thu, 21 Jan 2021 11:03:14 +0200 Subject: [PATCH] add sign_out sign_in function for epp_log --- test/integration/admin_area/epp_logs_test.rb | 40 +++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/test/integration/admin_area/epp_logs_test.rb b/test/integration/admin_area/epp_logs_test.rb index 2d0dd6806..9a2c9053c 100644 --- a/test/integration/admin_area/epp_logs_test.rb +++ b/test/integration/admin_area/epp_logs_test.rb @@ -7,14 +7,52 @@ class AdminEppLogsIntegrationTest < ApplicationSystemTestCase sign_in users(:admin) end + # def test_helper_test + # user = users(:admin) + # new_session_id = 'new-session-id' + + # request_xml = <<-XML + # + # + # + # + # #{user.username} + # #{user.plain_text_password} + # + # 1.0 + # en + # + # + # https://epp.tld.ee/schema/domain-eis-1.0.xsd + # https://epp.tld.ee/schema/contact-ee-1.1.xsd + # urn:ietf:params:xml:ns:host-1.0 + # urn:ietf:params:xml:ns:keyrelay-1.0 + # + # + # + # + # XML + # assert_difference 'EppSession.count' do + # post '/epp/session/login', params: { frame: request_xml }, + # headers: { 'HTTP_COOKIE' => "session=#{new_session_id}" } + # end + # assert_epp_response :completed_successfully + # session = EppSession.last + # assert_equal new_session_id, session.session_id + # assert_equal user, session.user + # end + def test_visit_epp_logs_page visit admin_epp_logs_path assert_text 'EPP log' end def test_show_epp_log_page + sign_out users(:admin) + sign_in users(:admin) visit admin_epp_logs_path - find(:css, ".table > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(1) > a:nth-child(1)", match: :first).click + puts find(:xpath, "//body", match: :first).native + find(:xpath, "//tbody/tr/td/a", match: :first).click assert_text 'Details' end