mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +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:
@@ -76,8 +76,10 @@ describe("VaultGeneratorDialogComponent", () => {
|
||||
component.onValueGenerated("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", () => {
|
||||
@@ -88,8 +90,10 @@ describe("VaultGeneratorDialogComponent", () => {
|
||||
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", () => {
|
||||
@@ -100,8 +104,10 @@ describe("VaultGeneratorDialogComponent", () => {
|
||||
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 update button text when algorithm is selected", () => {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user