1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[PM-23816] Revert aria disabled buttons (#15656)

* Revert "[CL-295] Use aria-disabled on buttons (#15009)"

This reverts commit 682f1f83d9.

* fix import

* bring back story fixes
This commit is contained in:
Bryan Cunningham
2025-07-17 11:40:22 -04:00
committed by GitHub
parent 127fed70ac
commit 250e46ee70
9 changed files with 71 additions and 140 deletions

View File

@@ -70,8 +70,10 @@ describe("WebVaultGeneratorDialogComponent", () => {
generator.valueGenerated.emit("test-password");
fixture.detectChanges();
const button = fixture.debugElement.query(By.css("[data-testid='select-button']"));
expect(button.attributes["aria-disabled"]).toBe(undefined);
const button = fixture.debugElement.query(
By.css("[data-testid='select-button']"),
).nativeElement;
expect(button.disabled).toBe(false);
});
it("should disable the button if no value has been generated", () => {
@@ -82,8 +84,10 @@ describe("WebVaultGeneratorDialogComponent", () => {
generator.algorithmSelected.emit({ useGeneratedValue: "Use Password" } as any);
fixture.detectChanges();
const button = fixture.debugElement.query(By.css("[data-testid='select-button']"));
expect(button.attributes["aria-disabled"]).toBe("true");
const button = fixture.debugElement.query(
By.css("[data-testid='select-button']"),
).nativeElement;
expect(button.disabled).toBe(true);
});
it("should disable the button if no algorithm is selected", () => {
@@ -94,8 +98,10 @@ describe("WebVaultGeneratorDialogComponent", () => {
generator.valueGenerated.emit("test-password");
fixture.detectChanges();
const button = fixture.debugElement.query(By.css("[data-testid='select-button']"));
expect(button.attributes["aria-disabled"]).toBe("true");
const button = fixture.debugElement.query(
By.css("[data-testid='select-button']"),
).nativeElement;
expect(button.disabled).toBe(true);
});
it("should close with selected value when confirmed", () => {