Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Better waiting for title

Oliver Günther3e36b279143e
diff --git a/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts b/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts
index 46d6a299a13..ebd4d15f370 100644
--- a/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts
+++ b/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts
@@ -13,7 +13,7 @@ export abstract class AbstractWidgetComponent {
@Output() resourceChanged = new EventEmitter<WidgetChangeset>();
- public get widgetName() {
+ public get widgetName():string {
let fallback = this.resource.options.name;
let widgetIdentifier = this.resource.identifier;
return this.i18n.t(
diff --git a/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts b/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts
index 3643b9d59c5..9c359cc3336 100644
--- a/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts
+++ b/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts
@@ -71,6 +71,10 @@ export class WidgetWpTableComponent extends AbstractWidgetComponent {
});
}
+ public get widgetName() {
+ return this.resource.options.name as string;
+ }
+
public static get identifier():string {
return 'work_packages_table';
}
diff --git a/modules/dashboards/spec/features/work_package_table_spec.rb b/modules/dashboards/spec/features/work_package_table_spec.rb
index 26d1d22933a..d786c4733b7 100644
--- a/modules/dashboards/spec/features/work_package_table_spec.rb
+++ b/modules/dashboards/spec/features/work_package_table_spec.rb
@@ -173,8 +173,7 @@ describe 'Arbitrary WorkPackage query table widget dashboard', type: :feature, j
.not_to have_selector('.subject', text: other_project_work_package.subject)
within filter_area.area do
- expect(find('.editable-toolbar-title--input').value)
- .to eql('My WP Filter')
+ expect(page).to have_field('editable-toolbar-title', with: 'My WP Filter', wait: 10)
end
end
end
diff --git a/modules/my_page/spec/features/my/work_package_table_spec.rb b/modules/my_page/spec/features/my/work_package_table_spec.rb
index 28aab5e0246..b439d894681 100644
--- a/modules/my_page/spec/features/my/work_package_table_spec.rb
+++ b/modules/my_page/spec/features/my/work_package_table_spec.rb
@@ -150,8 +150,7 @@ describe 'Arbitrary WorkPackage query table widget on my page', type: :feature,
.to have_no_selector('.id', text: other_type_work_package.id)
within filter_area.area do
- expect(find('.editable-toolbar-title--input').value)
- .to eql('My WP Filter')
+ expect(page).to have_field('editable-toolbar-title', with: 'My WP Filter', wait: 10)
end
end
end