1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

[PM-28231] Enable component-class-suffix (#17384)

* Enable component-class-suffix

* Rename file
This commit is contained in:
Oscar Hinton
2025-11-18 13:26:38 +01:00
committed by GitHub
parent 8f04f25818
commit 9efc31534b
38 changed files with 111 additions and 88 deletions

View File

@@ -11,19 +11,19 @@ import { RadioButtonComponent } from "./radio-button.component";
import { RadioButtonModule } from "./radio-button.module";
describe("RadioGroupComponent", () => {
let fixture: ComponentFixture<TestApp>;
let testAppComponent: TestApp;
let fixture: ComponentFixture<TestAppComponent>;
let testAppComponent: TestAppComponent;
let buttonElements: RadioButtonComponent[];
let radioButtons: HTMLInputElement[];
beforeEach(async () => {
TestBed.configureTestingModule({
imports: [TestApp],
imports: [TestAppComponent],
providers: [{ provide: I18nService, useValue: new I18nMockService({}) }],
});
await TestBed.compileComponents();
fixture = TestBed.createComponent(TestApp);
fixture = TestBed.createComponent(TestAppComponent);
fixture.detectChanges();
testAppComponent = fixture.debugElement.componentInstance;
buttonElements = fixture.debugElement
@@ -76,6 +76,6 @@ describe("RadioGroupComponent", () => {
`,
imports: [FormsModule, RadioButtonModule],
})
class TestApp {
class TestAppComponent {
selected?: string;
}

View File

@@ -4,7 +4,7 @@ import { ControlValueAccessor, NgControl, Validators } from "@angular/forms";
import { I18nPipe } from "@bitwarden/ui-common";
import { BitLabel } from "../form-control/label.component";
import { BitLabelComponent } from "../form-control/label.component";
let nextId = 0;
@@ -32,7 +32,7 @@ export class RadioGroupComponent implements ControlValueAccessor {
readonly id = input(`bit-radio-group-${nextId++}`);
@HostBinding("class") classList = ["tw-block", "tw-mb-4"];
protected readonly label = contentChild(BitLabel);
protected readonly label = contentChild(BitLabelComponent);
constructor(@Optional() @Self() private ngControl?: NgControl) {
if (ngControl != null) {