80 Commits

Author SHA1 Message Date
Alexander Brandon Coles 86e40ffffe Adapt specs to capybara_accessible_selectors 0.16
Refactors the custom `:list`/`:list_item` selectors onto CAS's
`add_role_selector` and drops the now-native `Capybara::Node::Simple#role`
hack. `:list_item` resolves the listitem role, so specs matching
non-listitem `<li>` are updated (`have_row` for the custom field table,
presentation dividers via CSS).

CAS 0.16 also resolves role selectors by computed role and accessible
name, which our CSS-styled tables and Primer menus do not expose through
plain markup. Affected feature specs switch to robust locators:
Capybara's `:table_row`, the FullCalendar `data-date`, and the action
menu's real accessible name ("Edit status").

The `:columnheader` `colindex` filter lost its off-by-one offset and now
uses the true 1-based `th` position. Also fixes Webhooks `RowComponent`
spec capitalization.
2026-05-29 20:41:25 +02:00
Behrokh Satarnejad 56abad9b22 [65336] Missing breadcrumb in remaining pages (#19405)
* eke the last item section in breadcrumbs component optional

* add breadcrumbs to the duplicate page

* add breadcrumbs to the create new work package page

* add breadcrumbs to move and copy pages

* when there is one WP in the list of moving or copy, add it to the breadcrumbs

* add page header to bulk editor page

* fix failing tests

* show the list of moved Wps even when there is one item

* add instance name to the breadcrumb in any way

* add breadcrumbs to search page

* show global menu when there is no project selected, in search page

* remove home path from rails breadcrumbs

* ensure reliable click on autocomplete by using JS click to avoid overlapping elements

* fix failing test on selecting a value from select box in team planner and search box
2025-07-09 09:19:16 +02:00
Christophe Bliard 17447f3cc8 Fix flaky spec
spec: `./modules/team_planner/spec/features/team_planner_add_existing_work_packages_spec.rb:176`
failing job: https://github.com/opf/openproject/actions/runs/15991857052/job/45107671723

Moving by 800 pixels was too imprecise: it was moved to Wednesday
instead of being moved to Tuesday as intended. It was ok when the
element was not fully loaded, but not when it was. Probably its
dimensions changed a bit and that was enough to fall on the wrong day...

The fix is to drag from the card to the target date column header, with
an y offset of the header's height. This way it's dragged exactly on the
day area below the day header. It works even if we change the default
dimensions of everything.
2025-07-01 11:49:29 +02:00
Henriette Darge efe54cf8ca Use Primer Button for "AddButtonComponent" 2024-10-11 09:46:24 +02:00
Behrokh Satarnejad 3bf74a9b2c fix failing tests in team planners 2024-09-25 17:18:48 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Henriette Darge 896dd8e7da Merge obsolete "sidebar.sass" and "sidemenu.sass" files into one new "submenu_component.sass" and harmonize the selectors 2024-07-11 15:29:49 +02:00
Ivan Kuchin fa5d03eae0 rubocop safe autocorrect all except Rails/WhereRange 2024-05-30 19:54:08 +02:00
Jens Ulferts 5cf73ae0df Merge pull request #15410 from opf/fix-flaky-spec
Attempt to fix flaky specs where the toast might disappear before the page finishes loading
2024-05-03 11:34:07 +02:00
Oliver Günther 8fbede7c8e Set boolean filters on by default 2024-05-02 12:07:55 +02:00
Dombi Attila 327bb93423 Remove explicit toast message expectation 2024-04-29 20:57:13 +02:00
Dombi Attila 3b4372b045 Fix failing specs due to toaster is not dismissed 2024-04-29 20:57:13 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Dombi Attila b4cb96f6b6 Bug/46490 number of displayed assignees in team planner wrongly restricted by objects per page (#14978)
* [#46490] Number of displayed assignees in team planner wrongly restricted by "objects per page"

https://community.openproject.org/work_packages/46490

* Refactor team_planner.add_assignee method to include retry_block

* Separate helper method to check for searching and adding

---------

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2024-03-12 09:45:48 +01:00
Dombi Attila 801f445f68 Increase wait time for team planner to reload
Co-authored-by: Aaron Contreras <61627014+aaron-contreras@users.noreply.github.com>
2024-02-01 14:23:20 +02:00
Dombi Attila 5baff99fb2 Improve team planner spec wait_for_loaded method 2024-02-01 14:23:19 +02:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Oliver Günther 8679a84690 Resize by more pixels 2023-11-20 08:32:20 +01:00
Oliver Günther 92259181ce Adapt specs to use introduced helpers 2023-09-13 09:02:42 +02:00
Christophe Bliard 39bac39c9d Make team planner tests slightly faster
- `search_user_to_add` call is useless as the `select_user_to_add`
  already does a search before the selection.

- `click_add_user` does not need to wait when checking the input
  presence. As it is almost always absent, this save 5 seconds.
2023-09-08 08:23:12 +02:00
Aaron Contreras b71416b41d Extract #click_to_sort_by into parent Page Class 2023-08-16 09:33:14 -05:00
Aaron Contreras cc1b7456ea Add expectations for sorting behavior in Team Planner Index Page 2023-08-16 09:33:12 -05:00
Aaron Contreras 5d374a1dcb Refactor: Clean up Team Planner Overview specs
This is simpler to grok through and would help me write the sorting
specs in an easier and clearer way.
2023-08-16 09:33:12 -05:00
ulferts f18ce94734 fix flaky team planner onboarding spec - hacky way 2023-07-24 14:50:54 +02:00
Aaron Contreras e36b0db762 Add Team Planner Global Create Form
Adds the Global Create Form along with the controller action, service
and contract for handling the creation and validation of this new view.
2023-07-14 13:26:09 -05:00
Aaron Contreras 681d72852d Extract "AddButtonComponent" for both overview and index pages
This component becomes a reusable button that can self-decide when
to render based on its context and can be used in both:

- the overview page (for the global create button)
- and the index page (for the project-specific create button)
2023-07-14 10:58:55 -05:00
Christophe Bliard b5b5b5bb06 Fix flaky test onboarding/team_planner_onboarding_tour_spec.rb 2023-07-07 12:08:49 +02:00
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard 81ac9d3056 Fix flaky test
When the team planner gets rerendered the drop down will be closed. If it happens at the bad time, the test will keep trying to find an element that has been closed.

Add the click in the retry block so that we try to open the dropdown everytime (clicking twice does not close it. It keeps it open)
2022-12-05 15:41:49 +01:00
Christophe Bliard 41673971c6 [44900] Set due date to start date for new milestone work packages (#11650)
* [44900] Set due date to start date for milestone new work packages

* Fix flaky test due to stale element
2022-11-17 07:59:56 +01:00
Christophe Bliard e3f4a6b582 Include Capybara::RSpecMatchers where DSL is included
This is needed to make these two statements equivalent:

    expect(page).not_to have_xpath('a')
    expect(page).to have_no_xpath('a')

So that the both matchers return early on element absence, instead of
timing out.

This is the continuation of e85b47979a.
2022-11-14 11:52:52 +01:00
ulferts 844778b677 add work week to team planner 2022-11-10 08:54:33 +01:00
Henriette Darge 70016a2417 Adapt autocomplete helper since ui-autocomplete does not exist any more and the project autocomplete HTML structure has changed 2022-06-24 10:26:10 +02:00
Oliver Günther 50bd23d0b4 Add spec for readonly team planner card 2022-06-15 11:09:37 +02:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard dc126c38d6 fix test failing because of stale element 2022-04-12 15:57:10 +02:00
Benjamin Bädorf b7f732ddcc Feature/41135 include all subprojects (#10413)
* Add new query attribute include_subprojects

* Set include_subprojects in factories

* Replace create_query helper with default endpoint

* Adapt spec to new query create service

* Add spec for changed subproject behavior

* Extend project filter with replaced values and add spec

* Fix spec trying to save default query

* Fix ordered_work_packages now that we're base service compatible

* Basic frontend for include all subprojects

* Fix disabled state, update button colors

* Add new query attribute include_subprojects

* Set include_subprojects in factories

* Replace create_query helper with default endpoint

* Adapt spec to new query create service

* Add spec for changed subproject behavior

* Extend project filter with replaced values and add spec

* Add a ParserStruct overriding Enumerable#group_by

* Fix ordered_work_packages now that we're base service compatible

* Add tooltip

* Add tooltips to include projects

* Add is parameter to query props for query space

* Fix specs, add i18n strings

* Correctly parse and update the query with includeSubprojects

* FIx most spec

* Fix badge count for team planner spec, fix duplicated where def in project filter

* Only load project list if opening drop modal

* Expect that sub_sub_bug is also present

* I18nify the strings

* Fix typo

* Fix specs

* Fix linting errors

* Fix specs

* Fix linting errors

* Fix linting errors

* Fix failing specs

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2022-04-07 11:40:36 +00:00
Benjamin Bädorf 47857ddcbe Use spot text-field for add existing search in team planner (#10328)
* Use spot text-field for add existing search in team planner

* Add close button to spot-text-field by default

* Change clear button to show by default

* Fix add existing spec
2022-03-24 12:50:44 +00:00
Henriette Darge 6051dd31af Merge pull request #10320 from opf/feature/41050-Add-team-planner-to-onboarding-tour
[41050] Add team planner to onboarding tour
2022-03-22 10:05:21 +01:00
Henriette Darge 4d95cf1ace Fix rubocop issues and stabilise the test a bit 2022-03-22 08:49:49 +01:00
Oliver Günther 204ef6479f Render background events as highlights for blocking 2022-03-21 07:59:32 +01:00
Henriette Darge 6e409089a5 Add basic test for the team planner onboarding tour (wip as it is still failing) 2022-03-18 08:26:53 +01:00
Christophe Bliard 9ea06599f5 fix flickering team_planner integration test
Sometimes, the two user lanes are in reversed order, and moving wp card by -100 pixels sets it out of the team planner bounds. Computing and using the right offset fixed it.

to reproduce the issue: bundle exec rspec './modules/documents/spec/features/attachment_upload_spec.rb[1:1:1:1,1:2:1:1]' './modules/team_planner/spec/features/team_planner_user_interaction_spec.rb[1:1:1,1:2:1]' --seed 41879 -O .rspec_parallel
2022-03-09 15:07:33 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther f5959a5258 [41080] Pass selection of cards from add existing to calendar service
https://community.openproject.org/wp/41080
2022-02-28 17:25:19 +01:00
Oliver Günther ad6c57cf1d [40988] Reload add existing search when removing events
https://community.openproject.org/wp/40988
2022-02-28 17:16:35 +01:00