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.
* 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
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.
* [#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>
- `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.
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)
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)
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.
* 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>
* 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
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