Fix date milestone field

pull/5212/head
Oliver Günther 8 years ago
parent 6eaa291f88
commit 698bbb7938
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 1
      frontend/app/components/work-packages/wp-single-view/wp-single-view.directive.ts
  2. 33
      spec/features/types/form_configuration_spec.rb

@ -207,6 +207,7 @@ export class WorkPackageSingleViewController {
fieldNames.forEach((fieldName:string) => {
if (fieldName === 'date') {
descriptors.push(this.getDateField());
return;
}
if (!this.workPackage.schema[fieldName]) {

@ -239,19 +239,32 @@ describe 'form configuration', type: :feature, js: true do
end
# Empty attributes should be shown on toggle
wp_page.expect_hidden_field(:responsible)
wp_page.expect_hidden_field(:estimated_time)
wp_page.expect_hidden_field(:spent_time)
wp_page.view_all_attributes
expected_attributes = ->() do
wp_page.expect_hidden_field(:responsible)
wp_page.expect_hidden_field(:estimated_time)
wp_page.expect_hidden_field(:spent_time)
wp_page.view_all_attributes
wp_page.expect_group('Cool Stuff') do
wp_page.expect_attributes responsible: '-'
end
wp_page.expect_group('Cool Stuff') do
wp_page.expect_attributes responsible: '-'
wp_page.expect_group('Estimates and time') do
wp_page.expect_attributes estimated_time: '-'
wp_page.expect_attributes spent_time: '-'
end
end
wp_page.expect_group('Estimates and time') do
wp_page.expect_attributes estimated_time: '-'
wp_page.expect_attributes spent_time: '-'
end
# Should match on edit view
expected_attributes.call
# New work package has the same configuration
wp_page.click_create_wp_button(type)
expected_attributes.call
find('#work-packages--edit-actions-cancel').click
expect(wp_page).not_to have_alert_dialog
loading_indicator_saveguard
end
end

Loading…
Cancel
Save