Follow up: Removed validation code since Selenium tests work in the PRODUCTION environment while the test code runs in TEST environment. That's why you can't access the DB from within a browser test.

This commit is contained in:
Thorsten Eckel 2018-04-03 11:01:08 +02:00
parent 213ec47696
commit 525de8413c

View file

@ -51,108 +51,6 @@ class AdminObjectManagerTreeSelectTest < TestCase
}, },
) )
correct_options = [
{
'name' => 'Incident',
'value' => 'Incident',
'children' => [
{
'name' => 'Hardware',
'value' => 'Incident::Hardware',
'children' => [
{
'name' => 'Monitor',
'value' => 'Incident::Hardware::Monitor'
},
{
'name' => 'Mouse',
'value' => 'Incident::Hardware::Mouse'
},
{
'name' => 'Keyboard',
'value' => 'Incident::Hardware::Keyboard'
}
]
},
{
'name' => 'Softwareproblem',
'value' => 'Incident::Softwareproblem',
'children' => [
{
'name' => 'CRM',
'value' => 'Incident::Softwareproblem::CRM'
},
{
'name' => 'EDI',
'value' => 'Incident::Softwareproblem::EDI'
},
{
'name' => 'SAP',
'value' => 'Incident::Softwareproblem::SAP',
'children' => [
{
'name' => 'Authentication',
'value' => 'Incident::Softwareproblem::SAP::Authentication'
},
{
'name' => 'Not reachable',
'value' => 'Incident::Softwareproblem::SAP::Not reachable'
}
]
},
{
'name' => 'MS Office',
'value' => 'Incident::Softwareproblem::MS Office',
'children' => [
{
'name' => 'Excel',
'value' => 'Incident::Softwareproblem::MS Office::Excel'
},
{
'name' => 'PowerPoint',
'value' => 'Incident::Softwareproblem::MS Office::PowerPoint'
},
{
'name' => 'Word',
'value' => 'Incident::Softwareproblem::MS Office::Word'
},
{
'name' => 'Outlook',
'value' => 'Incident::Softwareproblem::MS Office::Outlook'
}
]
}
]
}
]
},
{
'name' => 'Service request',
'value' => 'Service request',
'children' => [
{
'name' => 'New software requirement',
'value' => 'Service request::New software requirement'
},
{
'name' => 'New hardware',
'value' => 'Service request::New hardware'
},
{
'name' => 'Consulting',
'value' => 'Service request::Consulting'
}
]
},
{
'name' => 'Change request',
'value' => 'Change request'
}
]
created_attribute = ObjectManager::Attribute.last
assert_equal(correct_options, created_attribute.data_option[:options])
watch_for( watch_for(
css: '.content.active', css: '.content.active',
value: 'Database Update required', value: 'Database Update required',