| 190 |
190 |
# - 'Subject' exists in the import file
|
| 191 |
191 |
# - mapping is case insensitive
|
| 192 |
192 |
assert_select 'select[name=?]', 'import_settings[mapping][subject]' do
|
| 193 |
|
assert_select 'option[value="1"][selected="selected"]', :text => 'Subject'
|
|
193 |
assert_select 'option[value="2"][selected="selected"]', :text => 'Subject'
|
| 194 |
194 |
end
|
| 195 |
195 |
|
| 196 |
196 |
# 'estimated_hours' should be auto selected because
|
| 197 |
197 |
# - 'estimated_hours' exists in the import file
|
| 198 |
198 |
assert_select 'select[name=?]', 'import_settings[mapping][estimated_hours]' do
|
| 199 |
|
assert_select 'option[value="10"][selected="selected"]', :text => 'estimated_hours'
|
|
199 |
assert_select 'option[value="11"][selected="selected"]', :text => 'estimated_hours'
|
| 200 |
200 |
end
|
| 201 |
201 |
|
| 202 |
202 |
# 'fixed_version' should be auto selected because
|
| 203 |
203 |
# - the translation 'Target version' exists in the import file
|
| 204 |
204 |
assert_select 'select[name=?]', 'import_settings[mapping][fixed_version]' do
|
| 205 |
|
assert_select 'option[value="7"][selected="selected"]', :text => 'target version'
|
|
205 |
assert_select 'option[value="8"][selected="selected"]', :text => 'target version'
|
| 206 |
206 |
end
|
| 207 |
207 |
|
| 208 |
208 |
# 'assigned_to' should not be auto selected because
|
| ... | ... | |
| 214 |
214 |
# Custom field 'Float field' should be auto selected because
|
| 215 |
215 |
# - the internal field name ('cf_6') exists in the import file
|
| 216 |
216 |
assert_select 'select[name=?]', 'import_settings[mapping][cf_6]' do
|
| 217 |
|
assert_select 'option[value="14"][selected="selected"]', :text => 'cf_6'
|
|
217 |
assert_select 'option[value="15"][selected="selected"]', :text => 'cf_6'
|
| 218 |
218 |
end
|
| 219 |
219 |
|
| 220 |
220 |
# Custom field 'Database' should be auto selected because
|
| 221 |
221 |
# - field name 'database' exists in the import file
|
| 222 |
222 |
# - mapping is case insensitive
|
| 223 |
223 |
assert_select 'select[name=?]', 'import_settings[mapping][cf_1]' do
|
| 224 |
|
assert_select 'option[value="13"][selected="selected"]', :text => 'database'
|
|
224 |
assert_select 'option[value="14"][selected="selected"]', :text => 'database'
|
| 225 |
225 |
end
|
| 226 |
226 |
end
|
| 227 |
227 |
|