perf(webui): load optional password generation on demand

This commit is contained in:
2026-09-08 03:15:07 +02:00
parent c209b3c27d
commit c3daa4a9aa
7 changed files with 212 additions and 14 deletions
+10
View File
@@ -66,6 +66,16 @@ assert(!markup.includes("password-generator-dialog"), "the generator dialog stay
assert(markup.includes('data-help-context-id="access.authentication.password"'), "the owner context reaches the password field and its actions");
assert(markup.includes('data-help-module-id="access"'), "the password field retains its documentation owner");
for (const flags of [{}, { generator: true, disabled: true }, { generator: true, readOnly: true }]) {
const unavailableMarkup = renderToStaticMarkup(
<PlatformLanguageProvider>
<PasswordField value="fixture-password" onValueChange={() => undefined} {...flags} />
</PlatformLanguageProvider>
);
assert(!unavailableMarkup.includes('aria-label="Generate password"'), "unavailable generation cannot open the optional dialog");
assert(!unavailableMarkup.includes("module-load-progress"), "closed generators never begin loading while rendering a field");
}
const dialogMarkup = renderToStaticMarkup(
<PlatformLanguageProvider>
<PasswordGeneratorDialog