Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mgr/dashboard: Refactoring of
DeletionModalComponent
- Simpler variable names: Examples: - `actionDescription` instead of `metaType` - `bodyTemplate` instead of `description` - `validationPattern` instead of `pattern` Some of these variable names have been generalized to ease the unification/generalization of dialog components: - `submitAction` instead of `deletionMethod` - Removed unique `setUp` method. Benefits: - Creation of the component is done as intended by the developers of the `ngx-boostrap` package and as expected by developers which use the package. The `setUp` method does not have to be called anymore on the `DeletionModalComponent` exclusively but instead the component is instantiated as all other modals. Property assignment on the instantiated object isn't handled by the `setUp` method anymore but by the `modalService`. - With the removal of the `setUp` method, some tests could be removed as well. - No need to pass the reference of the created modal to the modal manually. Preserved: - The provided check within the `setUp` method, which checked if the component had been correctly instantiated, has been moved to the `ngOnInit` method of the component. Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
- Loading branch information
Showing
9 changed files
with
158 additions
and
271 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
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
Oops, something went wrong.