126 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
Ivan Kuchin b648341030 [#74768] Remove calculated_value_project_attribute feature flag
https://community.openproject.org/wp/74768
2026-05-19 17:42:42 +02:00
Alexander Brandon Coles e8767481e9 [#70166] Fix accessibility errors found by ERB Lint (#21503)
* Fix GitHub/NoTitleAttribute, LinkHasHref errors

- Replaces `title` attribute with `aria-label` for interactive elements.
- Removes `title` from non-interactive elements.
- Converts `<a>` tags without proper `href` to `<button>` elements,
  using Primer `Button`/`IconButton` where possible.

# Conflicts:
#	app/views/custom_fields/_custom_options.html.erb
#	spec/features/admin/custom_fields/shared_custom_field_expectations.rb
#	spec/features/admin/custom_fields/work_packages/list_spec.rb

* Fix Autocomplete missing errors

* Fix GitHub/NoPositiveTabIndex errors

Removes all positive `tabindex` values.

* Fix Rails/LinkToBlank errors

* Replace toast with Primer Banner on LDAP form

* Add frozen_string_literal

* Ignore erb lint for deprecated files

* Fix linting errors in repository module

* Fix linting errors in budgets and custom actions

* Fix linting errors in member form and 2fa

* Fix linting errors in mcost types and wiki help and storages

* Fix linting errors in multi select filters, ifc viewer, and unsupported browser banner

* Fix failing spec

* Use Primer banner instead of op-toast where ever it is possible

* Use octicon instead of op_icon

* Fix failing tests

* Use no-decoration-on-hover for button links and change the button with only an icon to primer icon button

* Keep webhook response modal activation selector class-based

* use icon button for edit of hourly rate

---------

Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
2026-05-07 10:31:10 +02:00
Henriette Darge c814a59bd4 Correctly show the blue info banner when no items are present. Further, show an error message when trying to delete the last custom option 2026-03-09 10:56:04 +01:00
Ivan Kuchin 2d2fccce8c add has_comment to field formats using primer form 2026-02-25 16:00:17 +01:00
Henriette Darge 6e228dc06a Fine-tune the shown forms of custom fields & fix tests 2026-02-23 09:08:21 +01:00
Ivan Kuchin 51b3a377e4 fix copyright header 2026-01-14 17:52:59 +01:00
Ivan Kuchin 727809562f test weighted item list custom field format fields 2026-01-14 17:52:59 +01:00
Ivan Kuchin f6a878775a cleanup comments in custom field format shared spec 2026-01-14 17:52:58 +01:00
Ivan Kuchin 4f387ec1da test calculated value custom field format fields 2026-01-14 17:52:58 +01:00
Ivan Kuchin 16f518ee86 expect editable field for user custom field 2026-01-14 17:52:57 +01:00
Ivan Kuchin 0dcc6d3d11 expect is filter and content right to left fields for work package custom field 2026-01-14 17:52:57 +01:00
Ivan Kuchin af78060e11 expect searchable field for work package and project custom field 2026-01-14 17:52:56 +01:00
Ivan Kuchin b0bf2748e4 expect admin only field for user and project custom field 2026-01-14 17:52:56 +01:00
Ivan Kuchin c0e671f68e expect is for all field for work package and project custom field 2026-01-14 17:52:55 +01:00
Ivan Kuchin ef015df588 expect section field for project custom field 2026-01-14 17:52:55 +01:00
Ivan Kuchin d9703fa46f singularize type in custom field format shared spec 2026-01-14 17:52:54 +01:00
Ivan Kuchin c556643232 split field checks into multiple switches 2026-01-14 17:52:54 +01:00
Ivan Kuchin 0b88e29799 check presence of name field for all custom field formats 2026-01-14 17:52:54 +01:00
Ivan Kuchin c5a5bad6de combine expectations for Text, Integer and Float field formats 2026-01-14 17:52:53 +01:00
Ivan Kuchin 2fe7e4d514 test fields shown for project attributes in admin form 2026-01-14 17:52:53 +01:00
Ivan Kuchin eb063ccb03 fix expecations of custom field hierarchy field format 2026-01-14 17:52:52 +01:00
Ivan Kuchin 65ae27160c fix customized type label for version custom fields 2026-01-14 17:52:51 +01:00
Ivan Kuchin e3b9f70e27 add link field format checks 2026-01-14 17:52:51 +01:00
Ivan Kuchin ab2019471b move click on field format selector outside of switch 2026-01-14 17:52:50 +01:00
Ivan Kuchin 237f026060 move switch for field formats inside single test to reduce repetition 2026-01-14 17:52:50 +01:00
Ivan Kuchin fe212fee56 test presence of fields/rich_text_fields instead of just labels, but absence of just labels in custom field format shared examples 2026-01-14 17:52:50 +01:00
Ivan Kuchin 0826a2b56d test presence of field labels or fieldsets instead of just texts in custom field format shared examples 2026-01-14 17:52:49 +01:00
Ivan Kuchin 5733b4a33a better dsl (expect_page_to_have) in custom field format shared examples 2026-01-14 17:52:49 +01:00
Ivan Kuchin 1337dcc14f cleanup project custom fields index page helper and scope add menu clicks inside the menu 2026-01-14 17:52:47 +01:00
Ivan Kuchin 0009cfd1df adapt shared custom field expectations to test project attributes too 2026-01-14 17:52:46 +01:00
Ivan Kuchin 3473972dda remove explicit requires of support/pages/custom_fields/index_page 2026-01-08 17:27:35 +01:00
Ivan Kuchin fe31eda259 delete Page suffix for few feature spec page helpers that had it 2026-01-08 17:27:35 +01:00
OpenProject Actions CI c7d88c5c2d Merge branch 'release/17.0' into dev 2025-12-18 14:13:56 +00:00
ulferts a24f6bc414 consolidate custom field form and component 2025-12-17 17:12:45 +01:00
ulferts 782027843d remove required from calculated and bool 2025-12-16 18:18:22 +01:00
Tobias Dillmann 147fafb1c0 [#69399] Project Custom Field specs for is_for_all 2025-12-12 09:59:56 +01:00
Tobias Dillmann 68dda34004 [#69399] Make specs green 2025-12-12 09:59:51 +01:00
Eric Schubert 5cd155644c [#68225] fixed test expectation 2025-12-05 15:19:50 +01:00
Eric Schubert 2cc96ed390 Merge pull request #20867 from opf/implementation/68700-rename-to-weighted-item-list
[#68700] Rename to weighted item list
2025-11-04 10:21:22 +01:00
Dombi Attila a5e6aee056 [#68661] Calculated Value: Value starts with capital letter
https://community.openproject.org/work_packages/68661
2025-11-04 10:37:17 +02:00
Eric Schubert 4ec381034a [#68700] add enterprise switch to test setups 2025-11-03 21:50:25 +01:00
Eric Schubert 38d5222c5b [#68700] replace score with weight
- add migration for db column name
- update AR relations in code
- update display texts and locale keys
- update test, method, class, variable names
- fix formatting mistake in item base controller
2025-11-03 13:58:05 +01:00
Yauheni Suhakou f4b696b35e Fix rubocop 2025-10-30 16:53:05 +01:00
Yauheni Suhakou 0de0713a53 Big rename
Renames `scored_list` to `weighted_item_list`
2025-10-30 15:36:55 +01:00
Eric Schubert deaec0c8a5 [#67623] remove feature flag for weighted item list
- https://community.openproject.org/wp/67623
2025-10-30 15:07:02 +01:00
Ivan Kuchin 734445bcf8 prevent flakyness of feature spec 2025-10-21 17:28:36 +02:00
Tobias Dillmann ffaeee77ad [#64524] Feature spec: recalculate on hierarchy item deletion 2025-10-17 19:32:59 +02:00
Tobias Dillmann 6df06c3077 [#64524] Feature spec: recalculate on score update 2025-10-17 19:32:59 +02:00
Ivan Kuchin 67c2f7f95a add scored list field to a formula during a feature test 2025-10-17 19:32:03 +02:00