perf(webui): load optional password generation on demand
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user