mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
added tests for epp logs
This commit is contained in:
parent
46e1e05eb6
commit
836e7c01fe
1 changed files with 34 additions and 0 deletions
34
test/integration/admin_area/epp_logs_test.rb
Normal file
34
test/integration/admin_area/epp_logs_test.rb
Normal file
|
@ -0,0 +1,34 @@
|
|||
# admin_epp_logs_path
|
||||
require 'test_helper'
|
||||
require 'application_system_test_case'
|
||||
|
||||
class AdminEppLogsIntegrationTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def test_visit_epp_logs_page
|
||||
visit admin_epp_logs_path
|
||||
assert_text 'EPP log'
|
||||
end
|
||||
|
||||
def test_show_epp_log_page
|
||||
visit admin_epp_logs_path
|
||||
find(:xpath, "//tbody/tr/td/a", match: :first).click
|
||||
assert_text 'Details'
|
||||
end
|
||||
|
||||
def test_dates_sort
|
||||
Capybara.exact = true
|
||||
visit admin_epp_logs_path
|
||||
|
||||
find(:xpath, "//a[contains(text(), 'Created at')]", match: :first).click
|
||||
find(:xpath, "//a[contains(text(), 'Created at')]", match: :first).click
|
||||
|
||||
epp_log_date = find(:xpath, "//table/tbody/tr/td[6]", match: :first).text(:all)
|
||||
date_now = Date.today.to_s(:db)
|
||||
|
||||
assert_match /#{date_now}/, epp_log_date
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue