Skip to content

Commit

Permalink
angular: add standalone to missing components (#28005)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Nov 26, 2024
1 parent 02a893f commit 9750653
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,8 @@ describe('MainComponent', () => {
<%_ } _%>
});

@Component({ template: '' })
@Component({
standalone: true,
template: '',
})
export class BlankComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { Account } from 'app/core/auth/account.model';
import HasAnyAuthorityDirective from './has-any-authority.directive';

@Component({
standalone: true,
imports: [HasAnyAuthorityDirective],
template: ` <div *<%= jhiPrefix %>HasAnyAuthority="'ROLE_ADMIN'" #content></div> `,
})
class TestHasAnyAuthorityDirectiveComponent {
Expand All @@ -43,8 +45,7 @@ describe('HasAnyAuthorityDirective tests', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [HasAnyAuthorityDirective<%_ if (enableTranslation) { _%>, TranslateModule.forRoot()<%_ } _%>],
declarations: [TestHasAnyAuthorityDirectiveComponent],
imports: [TestHasAnyAuthorityDirectiveComponent<%_ if (enableTranslation) { _%>, TranslateModule.forRoot()<%_ } _%>],
providers: [provideHttpClient(), AccountService],
});
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { TranslateModule, TranslateService } from '@ngx-translate/core';
import TranslateDirective from './translate.directive';

@Component({
standalone: true,
imports: [TranslateDirective],
template: ` <div <%= jhiPrefix %>Translate="test"></div> `,
})
class TestTranslateDirectiveComponent {}
Expand All @@ -33,8 +35,7 @@ describe('TranslateDirective Tests', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), TranslateDirective],
declarations: [TestTranslateDirectiveComponent],
imports: [TranslateModule.forRoot(), TestTranslateDirectiveComponent],
});
}));

Expand Down

0 comments on commit 9750653

Please sign in to comment.