Merge pull request #8236 from opf/fix/32835-After-adding-or-removing-a-column-the-change-is-not-indicated-in-the-query

[32835] After adding or removing a column the change is not indicated in the query
pull/8239/head
Oliver Günther 5 years ago committed by GitHub
commit 244eae4e9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
  2. 17
      spec/features/work_packages/table/queries/query_name_inline_edit_spec.rb

@ -107,6 +107,7 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp
const toState = transition.to();
this.hasQueryProps = !!params.query_props;
this.setPartition(toState);
this.cdRef.detectChanges();
});
// If the query was loaded, reload invisibly

@ -62,6 +62,8 @@ describe 'Query name inline edit', js: true do
end
let(:wp_table) { Pages::WorkPackagesTable.new(project) }
let(:modal) { ::Components::WorkPackages::TableConfigurationModal.new }
let(:columns) { ::Components::WorkPackages::Columns.new }
let(:filters) { ::Components::WorkPackages::Filters.new }
let(:query_title) { ::Components::WorkPackages::QueryTitle.new }
@ -87,6 +89,7 @@ describe 'Query name inline edit', js: true do
# Expect unchanged
query_title.expect_not_changed
assignee_query.reload
expect(assignee_query.filters.count).to eq(1)
expect(assignee_query.filters.first.name).to eq :status_id
@ -114,4 +117,18 @@ describe 'Query name inline edit', js: true do
assignee_query.reload
expect(assignee_query.name).to eq 'Some other name'
end
it 'shows the save icon when changing the columns (Regression #32835)' do
wp_table.expect_work_package_listed work_package
query_title.expect_not_changed
modal.open!
modal.switch_to 'Columns'
columns.assume_opened
columns.uncheck_all save_changes: false
columns.add 'Subject', save_changes: true
query_title.expect_changed
end
end

Loading…
Cancel
Save