Block change recovery key button while a change is ongoing. (#30664)
* Block change recovery key button while a change is ongoing. * Add disable check * lint * Ensure we test that spamming the button doesn't break it. * Mock out modals * lint * add two more clicks * lint --------- Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
This commit is contained in:
@@ -104,7 +104,10 @@ class Helpers {
|
||||
|
||||
const clipboardContent = await this.app.getClipboard();
|
||||
await dialog.getByRole("textbox").fill(clipboardContent);
|
||||
await dialog.getByRole("button", { name: confirmButtonLabel }).click();
|
||||
const button = dialog.getByRole("button", { name: confirmButtonLabel });
|
||||
await button.click();
|
||||
// Button should disable immediately after clicking.
|
||||
await expect(button).toBeDisabled();
|
||||
await expect(this.getEncryptionRecoverySection()).toMatchScreenshot("default-recovery.png");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user