forked from opf/openproject
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This causes the multivalue change event to fail complete in Chrome. For consistency, I added the ngModelOptions to clarify use of getter/setter on the model variable. https://community.openproject.com/wp/26611
- Loading branch information
1 parent
5ee98c4
commit 7802034
Showing
6 changed files
with
88 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
spec/support/work_packages/work_package_multi_select_field.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
require_relative './work_package_field' | ||
|
||
class WorkPackageMultiSelectField < WorkPackageField | ||
|
||
def multiselect? | ||
field_container.has_selector?('.wp-inline-edit--toggle-multiselect .icon-minus2') | ||
end | ||
|
||
def toggle_multiselect | ||
field_container.find('.wp-inline-edit--toggle-multiselect').click | ||
end | ||
|
||
def expect_save_button(enabled: true) | ||
if enabled | ||
expect(field_container).to have_no_selector("#{control_link}[disabled]") | ||
else | ||
expect(field_container).to have_selector("#{control_link}[disabled]") | ||
end | ||
end | ||
|
||
def save! | ||
submit_by_click | ||
end | ||
|
||
def field_type | ||
'select' | ||
end | ||
|
||
def control_link(action = :save) | ||
raise 'Invalid link' unless [:save, :cancel].include?(action) | ||
".inplace-edit--control--#{action}" | ||
end | ||
end |