mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
7da3804321
12 changed files with 1650 additions and 1358 deletions
|
@ -2,21 +2,41 @@ class Registrar::DomainsController < Registrar::DeppController # EPP controller
|
||||||
before_action :init_domain, except: :new
|
before_action :init_domain, except: :new
|
||||||
before_action :init_contacts_autocomplete_map, only: [:new, :edit, :create, :update]
|
before_action :init_contacts_autocomplete_map, only: [:new, :edit, :create, :update]
|
||||||
|
|
||||||
|
# rubocop: disable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: disable Metrics/CyclomaticComplexity
|
||||||
|
# rubocop: disable Metrics/AbcSize
|
||||||
def index
|
def index
|
||||||
authorize! :view, Depp::Domain
|
authorize! :view, Depp::Domain
|
||||||
limit, offset = pagination_details
|
|
||||||
|
|
||||||
res = depp_current_user.repp_request('domains', { details: true, limit: limit, offset: offset })
|
params[:q] ||= {}
|
||||||
if res.code == '200'
|
if params[:statuses_contains]
|
||||||
@response = res.parsed_body.with_indifferent_access
|
domains = current_user.registrar.domains.includes(:registrar, :registrant).where(
|
||||||
@contacts = @response ? @response[:contacts] : []
|
"statuses @> ?::varchar[]", "{#{params[:statuses_contains].join(',')}}"
|
||||||
|
)
|
||||||
@paginatable_array = Kaminari.paginate_array(
|
else
|
||||||
[], total_count: @response[:total_number_of_records]
|
domains = current_user.registrar.domains.includes(:registrar, :registrant)
|
||||||
).page(params[:page]).per(limit)
|
|
||||||
end
|
end
|
||||||
flash.now[:epp_results] = [{ 'code' => res.code, 'msg' => res.message }]
|
|
||||||
|
normalize_search_parameters do
|
||||||
|
@q = domains.search(params[:q])
|
||||||
|
@domains = @q.result.page(params[:page])
|
||||||
|
if @domains.count == 1 && params[:q][:name_matches].present?
|
||||||
|
redirect_to info_registrar_domains_path(domain_name: @domains.first.name) and return
|
||||||
|
elsif @domains.count == 0 && params[:q][:name_matches] !~ /^%.+%$/
|
||||||
|
# if we do not get any results, add wildcards to the name field and search again
|
||||||
|
n_cache = params[:q][:name_matches]
|
||||||
|
params[:q][:name_matches] = "%#{params[:q][:name_matches]}%"
|
||||||
|
@q = domains.search(params[:q])
|
||||||
|
@domains = @q.result.page(params[:page])
|
||||||
|
params[:q][:name_matches] = n_cache # we don't want to show wildcards in search form
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||||
end
|
end
|
||||||
|
# rubocop: enable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: enable Metrics/CyclomaticComplexity
|
||||||
|
# rubocop: enable Metrics/AbcSize
|
||||||
|
|
||||||
def info
|
def info
|
||||||
authorize! :view, Depp::Domain
|
authorize! :view, Depp::Domain
|
||||||
|
@ -123,4 +143,18 @@ class Registrar::DomainsController < Registrar::DeppController # EPP controller
|
||||||
# @priv_contacts_autocomplete_map ||=
|
# @priv_contacts_autocomplete_map ||=
|
||||||
# current_user.registrar.priv_contacts.pluck(:name, :code).map { |c| ["#{c.second} #{c.first}", c.second] }
|
# current_user.registrar.priv_contacts.pluck(:name, :code).map { |c| ["#{c.second} #{c.first}", c.second] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def normalize_search_parameters
|
||||||
|
ca_cache = params[:q][:valid_to_lteq]
|
||||||
|
begin
|
||||||
|
end_time = params[:q][:valid_to_lteq].try(:to_date)
|
||||||
|
params[:q][:valid_to_lteq] = end_time.try(:end_of_day)
|
||||||
|
rescue
|
||||||
|
logger.warn('Invalid date')
|
||||||
|
end
|
||||||
|
|
||||||
|
yield
|
||||||
|
|
||||||
|
params[:q][:valid_to_lteq] = ca_cache
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
%th{class: 'col-xs-6'}= t(:setting)
|
%th{class: 'col-xs-6'}= t(:setting)
|
||||||
%th{class: 'col-xs-6'}= t(:value)
|
%th{class: 'col-xs-6'}= t(:value)
|
||||||
%tbody
|
%tbody
|
||||||
= render 'setting_row', var: :transfer_wait_time
|
/= render 'setting_row', var: :transfer_wait_time
|
||||||
= render 'setting_row', var: :ds_algorithm
|
= render 'setting_row', var: :ds_algorithm
|
||||||
= render 'setting_row', var: :client_side_status_editing_enabled
|
= render 'setting_row', var: :client_side_status_editing_enabled
|
||||||
= render 'setting_row', var: :api_ip_whitelist_enabled
|
= render 'setting_row', var: :api_ip_whitelist_enabled
|
||||||
|
|
|
@ -7,42 +7,89 @@
|
||||||
= render 'shared/title', name: t(:domains)
|
= render 'shared/title', name: t(:domains)
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-12{style: 'margin-bottom: -15px;'}
|
.col-md-12
|
||||||
= form_tag info_registrar_domains_path, class: 'form-horizontal', method: :get do
|
= search_form_for [:registrar, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
|
||||||
.col-md-11
|
.row
|
||||||
.form-group
|
.col-md-3
|
||||||
= text_field_tag :domain_name, params[:domain_name], class: 'form-control', placeholder: t(:domain_name), autocomplete: 'off', autofocus: true
|
.form-group
|
||||||
.col-md-1.text-right.text-center-xs
|
= f.label :name
|
||||||
.form-group
|
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
||||||
%button.btn.btn-default
|
.col-md-3
|
||||||
|
.form-group
|
||||||
|
= f.label t(:registrant_ident)
|
||||||
|
= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident)
|
||||||
|
.col-md-3
|
||||||
|
.form-group
|
||||||
|
= f.label t(:contact_ident)
|
||||||
|
= f.search_field :contacts_ident_eq, class: 'form-control', placeholder: t(:contact_ident)
|
||||||
|
.col-md-3
|
||||||
|
.form-group
|
||||||
|
= f.label t(:nameserver_hostname)
|
||||||
|
= f.search_field :nameservers_hostname_eq, class: 'form-control', placeholder: t(:nameserver_hostname)
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
.form-group
|
||||||
|
= label_tag t(:status)
|
||||||
|
= select_tag :statuses_contains, options_for_select(DomainStatus::STATUSES, params[:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
||||||
|
.col-md-3
|
||||||
|
.form-group
|
||||||
|
= f.label t(:valid_to_from)
|
||||||
|
= f.search_field :valid_to_gteq, value: params[:q][:valid_to_gteq], class: 'form-control datepicker', placeholder: t(:valid_to_from)
|
||||||
|
.col-md-3
|
||||||
|
.form-group
|
||||||
|
= f.label t(:valid_to_until)
|
||||||
|
= f.search_field :valid_to_lteq, value: params[:q][:valid_to_lteq], class: 'form-control datepicker', placeholder: t(:valid_to_until)
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
.col-md-3
|
||||||
|
.form-group
|
||||||
|
= label_tag t(:results_per_page)
|
||||||
|
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
|
||||||
|
.col-md-3{style: 'padding-top: 25px;'}
|
||||||
|
%button.btn.btn-primary.search
|
||||||
|
|
||||||
%span.glyphicon.glyphicon-search
|
%span.glyphicon.glyphicon-search
|
||||||
|
|
||||||
|
%button.btn.btn-default.js-reset-form
|
||||||
|
= t(:clear_fields)
|
||||||
%hr
|
%hr
|
||||||
|
|
||||||
- if @response
|
.row
|
||||||
.table-responsive
|
.col-md-12
|
||||||
%table.table.table-hover.table-condensed
|
.table-responsive
|
||||||
%thead
|
%table.table.table-hover.table-bordered.table-condensed
|
||||||
%tr
|
%thead
|
||||||
%th{class: 'col-xs-3'}= t(:name)
|
|
||||||
%th{class: 'col-xs-6'}= t(:valid)
|
|
||||||
%th{class: 'col-xs-3'}= t(:actions)
|
|
||||||
%tbody
|
|
||||||
- @response['domains'].each do |x|
|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(x['name'], info_registrar_domains_path(domain_name: x['name']))
|
%th{class: 'col-xs-2'}
|
||||||
%td
|
= sort_link(@q, 'name')
|
||||||
= Time.zone.parse(x['valid_from']).try(:to_date)
|
%th{class: 'col-xs-2'}
|
||||||
\-
|
= sort_link(@q, 'registrant_name', t(:registrant))
|
||||||
= Time.zone.parse(x['valid_to']).try(:to_date)
|
%th{class: 'col-xs-2'}
|
||||||
%td
|
= sort_link(@q, 'valid_to', t(:valid_to))
|
||||||
= link_to(t(:edit), edit_registrar_domains_path(domain_name: x['name']),
|
%th{class: 'col-xs-2'}= t('actions')
|
||||||
class: 'btn btn-primary btn-xs')
|
%tbody
|
||||||
= link_to(t(:renew), renew_registrar_domains_path(domain_name: x['name']),
|
- @domains.each do |x|
|
||||||
class: 'btn btn-default btn-xs')
|
%tr
|
||||||
= link_to(t(:delete), delete_registrar_domains_path(domain_name: x['name']),
|
%td= link_to(truncate(x.name), info_registrar_domains_path(domain_name: x.name))
|
||||||
|
%td
|
||||||
|
- if x.registrant
|
||||||
|
= link_to(x.registrant, registrar_contact_path(id: x.registrant.code))
|
||||||
|
%td= l(x.valid_to, format: :date_long)
|
||||||
|
%td
|
||||||
|
= link_to(t(:edit), edit_registrar_domains_path(domain_name: x.name),
|
||||||
|
class: 'btn btn-primary btn-xs')
|
||||||
|
= link_to(t(:renew), renew_registrar_domains_path(domain_name: x.name),
|
||||||
class: 'btn btn-default btn-xs')
|
class: 'btn btn-default btn-xs')
|
||||||
|
= link_to(t(:delete), delete_registrar_domains_path(domain_name: x.name),
|
||||||
|
class: 'btn btn-default btn-xs')
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= paginate @domains
|
||||||
|
.col-md-6.text-right
|
||||||
|
.pagination
|
||||||
|
= t(:result_count, count: @domains.total_count)
|
||||||
|
|
||||||
= paginate @paginatable_array
|
:coffee
|
||||||
|
$(".js-reset-form").on "click", (e) ->
|
||||||
|
e.preventDefault();
|
||||||
|
window.location = "#{registrar_domains_path}"
|
||||||
|
|
|
@ -22,6 +22,7 @@ if con.present? && con.table_exists?('settings')
|
||||||
Setting.save_default(:ns_max_count, 11)
|
Setting.save_default(:ns_max_count, 11)
|
||||||
|
|
||||||
Setting.save_default(:transfer_wait_time, 0)
|
Setting.save_default(:transfer_wait_time, 0)
|
||||||
|
Setting.transfer_wait_time = 0
|
||||||
Setting.save_default(:request_confrimation_on_registrant_change_enabled, true)
|
Setting.save_default(:request_confrimation_on_registrant_change_enabled, true)
|
||||||
Setting.save_default(:request_confirmation_on_domain_deletion_enabled, true)
|
Setting.save_default(:request_confirmation_on_domain_deletion_enabled, true)
|
||||||
|
|
||||||
|
|
2121
doc/epp-examples.md
2121
doc/epp-examples.md
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
(function(){$(document).on("page:change",function(){return $(".selectize").selectize({allowEmptyOption:!0}),$("form").each(function(){return $(this).validate()}),$(".js-contact-form").on("restoreDefault",function(t){var e;switch(e=$(t.target),e.find(".js-ident-tip").hide(),$(".js-ident-country-code option:selected").val()){case"EE":return $(".js-ident-type").find("option[value=birthday]").prop("disabled",!0);default:return $(".js-ident-type").find("option[value=birthday]").prop("disabled",!1)}}),$(".js-ident-country-code").change(function(){var t;return t=$(".js-contact-form"),t.trigger("restoreDefault")}),$(".js-ident-type").change(function(t){var e;switch(e=$(".js-contact-form"),e.trigger("restoreDefault"),t.target.value){case"birthday":return e.find(".js-ident-tip").show()}}),$(".js-contact-form").trigger("restoreDefault")})}).call(this);
|
|
@ -907,7 +907,6 @@ describe 'EPP Domain', epp: true do
|
||||||
context 'with valid domain' do
|
context 'with valid domain' do
|
||||||
let(:domain) { Fabricate(:domain, registrar: @registrar1, dnskeys: []) }
|
let(:domain) { Fabricate(:domain, registrar: @registrar1, dnskeys: []) }
|
||||||
|
|
||||||
### TRANSFER ###
|
|
||||||
it 'transfers a domain' do
|
it 'transfers a domain' do
|
||||||
domain.registrar = @registrar1
|
domain.registrar = @registrar1
|
||||||
domain.save
|
domain.save
|
||||||
|
@ -928,6 +927,67 @@ describe 'EPP Domain', epp: true do
|
||||||
old_contact_codes = domain.contacts.pluck(:code).sort.uniq
|
old_contact_codes = domain.contacts.pluck(:code).sort.uniq
|
||||||
old_registrant_code = domain.registrant.code
|
old_registrant_code = domain.registrant.code
|
||||||
|
|
||||||
|
login_as :registrar2 do
|
||||||
|
response = epp_plain_request(xml)
|
||||||
|
domain.reload
|
||||||
|
dtl = domain.domain_transfers.last
|
||||||
|
|
||||||
|
trn_data = response[:parsed].css('trnData')
|
||||||
|
trn_data.css('name').text.should == domain.name
|
||||||
|
trn_data.css('trStatus').text.should == 'serverApproved'
|
||||||
|
trn_data.css('reID').text.should == 'REGDOMAIN2'
|
||||||
|
trn_data.css('reDate').text.should == dtl.transfer_requested_at.in_time_zone.utc.utc.iso8601
|
||||||
|
trn_data.css('acID').text.should == 'REGDOMAIN1'
|
||||||
|
trn_data.css('acDate').text.should == dtl.transferred_at.in_time_zone.utc.utc.iso8601
|
||||||
|
trn_data.css('exDate').text.should == domain.valid_to.in_time_zone.utc.utc.iso8601
|
||||||
|
|
||||||
|
domain.registrar.should == @registrar2
|
||||||
|
end
|
||||||
|
|
||||||
|
response = epp_plain_request(@epp_xml.session.poll)
|
||||||
|
|
||||||
|
response[:msg].should == 'Command completed successfully; ack to dequeue'
|
||||||
|
msg_q = response[:parsed].css('msgQ')
|
||||||
|
msg_q.css('qDate').text.should_not be_blank
|
||||||
|
|
||||||
|
msg_q.css('msg').text.should == "Domain transfer was approved, associated contacts were: " \
|
||||||
|
"#{old_contact_codes} and registrant was #{old_registrant_code}"
|
||||||
|
msg_q.first['id'].should_not be_blank
|
||||||
|
msg_q.first['count'].should == '1'
|
||||||
|
|
||||||
|
xml = @epp_xml.session.poll(poll: {
|
||||||
|
value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] }
|
||||||
|
})
|
||||||
|
|
||||||
|
response = epp_plain_request(xml)
|
||||||
|
response[:msg].should == 'Command completed successfully'
|
||||||
|
msg_q = response[:parsed].css('msgQ')
|
||||||
|
msg_q.first['id'].should_not be_blank
|
||||||
|
msg_q.first['count'].should == '0'
|
||||||
|
end
|
||||||
|
|
||||||
|
### TRANSFER ###
|
||||||
|
# Do not place this test to epp-examples (epp: false)
|
||||||
|
it 'transfers a domain with wait time > 0', epp: false do
|
||||||
|
domain.registrar = @registrar1
|
||||||
|
domain.save
|
||||||
|
|
||||||
|
pw = domain.auth_info
|
||||||
|
xml = domain_transfer_xml({
|
||||||
|
name: { value: domain.name },
|
||||||
|
authInfo: { pw: { value: pw } }
|
||||||
|
}, 'request', {
|
||||||
|
_anonymus: [
|
||||||
|
legalDocument: {
|
||||||
|
value: 'dGVzdCBmYWlsCg==',
|
||||||
|
attrs: { type: 'pdf' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
old_contact_codes = domain.contacts.pluck(:code).sort.uniq
|
||||||
|
old_registrant_code = domain.registrant.code
|
||||||
|
|
||||||
response = login_as :registrar2 do
|
response = login_as :registrar2 do
|
||||||
epp_plain_request(xml)
|
epp_plain_request(xml)
|
||||||
end
|
end
|
||||||
|
@ -1008,35 +1068,30 @@ describe 'EPP Domain', epp: true do
|
||||||
|
|
||||||
# should show up in other registrar's poll
|
# should show up in other registrar's poll
|
||||||
|
|
||||||
response = login_as :registrar2 do
|
login_as :registrar2 do
|
||||||
epp_plain_request(@epp_xml.session.poll)
|
response = epp_plain_request(@epp_xml.session.poll)
|
||||||
|
response[:msg].should == 'Command completed successfully; ack to dequeue'
|
||||||
|
msg_q = response[:parsed].css('msgQ')
|
||||||
|
msg_q.css('qDate').text.should_not be_blank
|
||||||
|
msg_q.css('msg').text.should == 'Transfer requested.'
|
||||||
|
msg_q.first['id'].should_not be_blank
|
||||||
|
msg_q.first['count'].should == '1'
|
||||||
|
|
||||||
|
xml = @epp_xml.session.poll(poll: {
|
||||||
|
value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] }
|
||||||
|
})
|
||||||
|
|
||||||
|
response = epp_plain_request(xml)
|
||||||
|
response[:msg].should == 'Command completed successfully'
|
||||||
|
msg_q = response[:parsed].css('msgQ')
|
||||||
|
msg_q.first['id'].should_not be_blank
|
||||||
|
msg_q.first['count'].should == '0'
|
||||||
end
|
end
|
||||||
|
|
||||||
response[:msg].should == 'Command completed successfully; ack to dequeue'
|
|
||||||
msg_q = response[:parsed].css('msgQ')
|
|
||||||
msg_q.css('qDate').text.should_not be_blank
|
|
||||||
msg_q.css('msg').text.should == 'Transfer requested.'
|
|
||||||
msg_q.first['id'].should_not be_blank
|
|
||||||
msg_q.first['count'].should == '1'
|
|
||||||
|
|
||||||
xml = @epp_xml.session.poll(poll: {
|
|
||||||
value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] }
|
|
||||||
})
|
|
||||||
|
|
||||||
response = login_as :registrar2 do
|
|
||||||
epp_plain_request(xml)
|
|
||||||
end
|
|
||||||
|
|
||||||
response[:msg].should == 'Command completed successfully'
|
|
||||||
msg_q = response[:parsed].css('msgQ')
|
|
||||||
msg_q.first['id'].should_not be_blank
|
|
||||||
msg_q.first['count'].should == '0'
|
|
||||||
|
|
||||||
create_settings
|
create_settings
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates a domain transfer with legal document' do
|
it 'creates a domain transfer with legal document' do
|
||||||
Setting.transfer_wait_time = 1
|
|
||||||
domain.legal_documents.count.should == 0
|
domain.legal_documents.count.should == 0
|
||||||
pw = domain.auth_info
|
pw = domain.auth_info
|
||||||
xml = domain_transfer_xml({
|
xml = domain_transfer_xml({
|
||||||
|
@ -1070,11 +1125,6 @@ describe 'EPP Domain', epp: true do
|
||||||
response = login_as :registrar2 do
|
response = login_as :registrar2 do
|
||||||
epp_plain_request(xml)
|
epp_plain_request(xml)
|
||||||
end
|
end
|
||||||
|
|
||||||
response[:result_code].should == '1000'
|
|
||||||
domain.legal_documents.count.should == 1 # does not add another legal documen
|
|
||||||
|
|
||||||
create_settings
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates transfer successfully without legal document' do
|
it 'creates transfer successfully without legal document' do
|
||||||
|
@ -1572,7 +1622,18 @@ describe 'EPP Domain', epp: true do
|
||||||
response[:results][0][:result_code].should == '2303'
|
response[:results][0][:result_code].should == '2303'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should allow querying domain transfer' do
|
it 'should not cancel transfer when there are none' do
|
||||||
|
xml = domain_transfer_xml({
|
||||||
|
name: { value: domain.name },
|
||||||
|
authInfo: { pw: { value: domain.auth_info } }
|
||||||
|
}, 'cancel')
|
||||||
|
|
||||||
|
response = epp_plain_request(xml)
|
||||||
|
response[:results][0][:msg].should == 'No transfers found'
|
||||||
|
response[:results][0][:result_code].should == '2303'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should allow querying domain transfer', epp: false do
|
||||||
Setting.transfer_wait_time = 1
|
Setting.transfer_wait_time = 1
|
||||||
pw = domain.auth_info
|
pw = domain.auth_info
|
||||||
xml = domain_transfer_xml({
|
xml = domain_transfer_xml({
|
||||||
|
|
|
@ -54,6 +54,47 @@ feature 'Domains', type: :feature do
|
||||||
|
|
||||||
page.should_not have_text(d1.name)
|
page.should_not have_text(d1.name)
|
||||||
page.should have_text(d2.name)
|
page.should have_text(d2.name)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should search domains' do
|
||||||
|
# having shared state across tests is really annoying sometimes...
|
||||||
|
click_link "#{@user} (#{@user.roles.first}) - #{@user.registrar}"
|
||||||
|
|
||||||
|
Fabricate(:domain, name: 'abcde.ee', registrar: @user.registrar)
|
||||||
|
Fabricate(:domain, name: 'abcdee.ee', registrar: @user.registrar)
|
||||||
|
Fabricate(:domain, name: 'defgh.pri.ee', registrar: @user.registrar)
|
||||||
|
|
||||||
|
visit '/registrar/domains'
|
||||||
|
click_link 'Domains'
|
||||||
|
|
||||||
|
page.should have_content('abcde.ee')
|
||||||
|
page.should have_content('abcdee.ee')
|
||||||
|
page.should have_content('defgh.pri.ee')
|
||||||
|
|
||||||
|
fill_in 'q_name_matches', with: 'abcde.ee'
|
||||||
|
find('.btn.btn-primary.search').click
|
||||||
|
|
||||||
|
current_path.should == "/registrar/domains/info"
|
||||||
|
|
||||||
|
visit '/registrar/domains'
|
||||||
|
fill_in 'q_name_matches', with: '.ee'
|
||||||
|
find('.btn.btn-primary.search').click
|
||||||
|
|
||||||
|
current_path.should == "/registrar/domains"
|
||||||
|
page.should have_content('abcde.ee')
|
||||||
|
page.should have_content('abcdee.ee')
|
||||||
|
page.should have_content('defgh.pri.ee')
|
||||||
|
|
||||||
|
fill_in 'q_name_matches', with: 'abcd%.ee'
|
||||||
|
find('.btn.btn-primary.search').click
|
||||||
|
page.should have_content('abcde.ee')
|
||||||
|
page.should have_content('abcdee.ee')
|
||||||
|
page.should_not have_content('defgh.pri.ee')
|
||||||
|
|
||||||
|
fill_in 'q_name_matches', with: 'abcd_.ee'
|
||||||
|
find('.btn.btn-primary.search').click
|
||||||
|
current_path.should == "/registrar/domains/info"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue