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

Improve spec, fix linting errors

Benjamin Bädorf119d46b5130f
diff --git a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
index afeb6fd1e3e..ff4e26c3835 100644
--- a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
+++ b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
@@ -90,16 +90,18 @@ export class TeamPlannerPageComponent extends WorkPackagesViewBase implements On
);
}
- ngOnInit() {
- this.refresh(true, true);
+ ngOnInit():void {
+ void this.refresh(true, true);
}
protected set loadingIndicator(promise:Promise<unknown>) {
this.loadingIndicatorService.indicator('calendar-entry').promise = promise;
}
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
public refresh(visibly:boolean, firstPage:boolean):Promise<unknown> {
- return this.loadingIndicator = this.wpListService.loadCurrentQueryFromParams(this.projectIdentifier);
+ this.loadingIndicator = this.wpListService.loadCurrentQueryFromParams(this.projectIdentifier);
+ return this.loadingIndicator;
}
/**
@@ -121,5 +123,4 @@ export class TeamPlannerPageComponent extends WorkPackagesViewBase implements On
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
changeChangesFromTitle(val:string):void {
}
-
}
diff --git a/modules/team_planner/spec/features/support/team_planner_page.rb b/modules/team_planner/spec/features/support/team_planner_page.rb
index a948bdc69fb..65d78bb956c 100644
--- a/modules/team_planner/spec/features/support/team_planner_page.rb
+++ b/modules/team_planner/spec/features/support/team_planner_page.rb
@@ -34,6 +34,7 @@ module Pages
include ::Components::NgSelectAutocompleteHelpers
def initialize(team_planner)
+ super()
@team_planner = team_planner
end
diff --git a/modules/team_planner/spec/features/team_planner_spec.rb b/modules/team_planner/spec/features/team_planner_spec.rb
index 1cb322af042..5b46b74ce40 100644
--- a/modules/team_planner/spec/features/team_planner_spec.rb
+++ b/modules/team_planner/spec/features/team_planner_spec.rb
@@ -58,6 +58,7 @@ describe 'Team planner', type: :feature, js: true do
filters.expect_filter_count("1")
filters.open
+ filters.open_available_filter_list
filters.expect_available_filter 'Author', present: true
filters.expect_available_filter 'ID', present: true
filters.expect_available_filter 'Finish date', present: false
diff --git a/spec/support/components/work_packages/filters.rb b/spec/support/components/work_packages/filters.rb
index 3903401c32b..a51f1ad3ed0 100644
--- a/spec/support/components/work_packages/filters.rb
+++ b/spec/support/components/work_packages/filters.rb
@@ -70,6 +70,12 @@ module Components
input.set text
end
+ def open_available_filter_list()
+ input = page.find('.advanced-filters--add-filter-value ng-input input')
+ input.hover
+ input.click
+ end
+
def expect_available_filter(name, present: true)
expect(page).to have_conditional_selector(present, '.advanced-filters--add-filter-value option', text: name)
end