-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy custom group properties in
group-utils
copyGroup function (#1843)
* fix: copy all properties of the group * test: write tests for copyGroup function * revert: revert copyGroup unit tests * test: write integration test for issue * test: add a test case for a single select * fix(test): replace ensure-safe-component with component helper invocation * ts: change Group interface to allow any property
- Loading branch information
Showing
5 changed files
with
118 additions
and
3 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
6 changes: 6 additions & 0 deletions
6
test-app/app/components/custom-group-component-with-variant.hbs
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,6 @@ | ||
<div> | ||
<span data-test-id="group-component-variant">{{@group.variant}}</span> | ||
- | ||
<span data-test-id="group-component-group-name">{{@group.groupName}}</span> | ||
</div> | ||
<div class="custom-component">{{yield}}</div> |
16 changes: 16 additions & 0 deletions
16
test-app/app/components/custom-group-component-with-variant.ts
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,16 @@ | ||
import templateOnly from '@ember/component/template-only'; | ||
|
||
export interface CustomGroupComponentWithVariantSignature { | ||
Element: Element; | ||
Args: { | ||
group: { | ||
groupName: string; | ||
variant: string; | ||
}; | ||
}; | ||
Blocks: { | ||
default: []; | ||
}; | ||
} | ||
|
||
export default templateOnly<CustomGroupComponentWithVariantSignature>(); |
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