Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[angular] Add tests for HasAnyAuthorityDirective and refactor shared folder #13265

Merged
merged 4 commits into from
Dec 14, 2020

Conversation

kaidohallik
Copy link
Contributor

In this PR:

  • using takeUntil for subscription destroying as discussed in Angular: use more generic unsubcriptions mechanism #12867
  • adding tests for HasAnyAuthorityDirective
  • as after adding tests there was too many files in shared root folder then moving item-count to pagination and has-any-authority to auth subfolder (where this was also in v6)

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@kaidohallik kaidohallik marked this pull request as ready for review December 14, 2020 09:44
import { HasAnyAuthorityDirective } from './has-any-authority.directive';

@Component({
template: ` <div *<%= jhiPrefix %>HasAnyAuthority="'ROLE_ADMIN'" #content></div> `,
Copy link
Contributor

@qmonmert qmonmert Dec 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it on purpose ?

+ `<div *<%= jhiPrefix %>HasAnyAuthority="'ROLE_ADMIN'" #content></div>`,
- ` <div *<%= jhiPrefix %>HasAnyAuthority="'ROLE_ADMIN'" #content></div> `,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's how Prettier formats inline HTML. I prefer to keep Prettier formatting in templates.

@DanielFran
Copy link
Member

@kaidohallik feel free to merge it.

@kaidohallik kaidohallik merged commit e1030ef into jhipster:main Dec 14, 2020
@kaidohallik kaidohallik deleted the refactor-angular-shared-folder branch December 14, 2020 14:46
@pascalgrimaud pascalgrimaud added this to the 7.0.0-beta.0 milestone Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants