mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
[BEEEP] [PM-3838] Refactor password callout (#6234)
This commit is contained in:
52
libs/auth/src/password-callout/password-callout.stories.ts
Normal file
52
libs/auth/src/password-callout/password-callout.stories.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { Meta, StoryObj, moduleMetadata } from "@storybook/angular";
|
||||
|
||||
import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { I18nMockService } from "@bitwarden/components";
|
||||
|
||||
import { PasswordCalloutComponent } from "./password-callout.component";
|
||||
|
||||
export default {
|
||||
title: "Auth/Password Callout",
|
||||
component: PasswordCalloutComponent,
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
providers: [
|
||||
{
|
||||
provide: I18nService,
|
||||
useFactory: () => {
|
||||
return new I18nMockService({
|
||||
masterPasswordPolicyInEffect:
|
||||
"One or more organization policies require your master password to meet the following requirements:",
|
||||
policyInEffectMinLength: "Minimum length of __$1__",
|
||||
policyInEffectMinComplexity: "Minimum complexity score of __$1__",
|
||||
policyInEffectUppercase: "Contain one or more uppercase characters",
|
||||
policyInEffectLowercase: "Contain one or more lowercase characters",
|
||||
policyInEffectNumbers: "Contain one or more numbers",
|
||||
policyInEffectSpecial:
|
||||
"Contain one or more of the following special characters $CHARS$",
|
||||
weak: "Weak",
|
||||
good: "Good",
|
||||
strong: "Strong",
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
} as Meta;
|
||||
|
||||
type Story = StoryObj<PasswordCalloutComponent>;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
policy: {
|
||||
minComplexity: 3,
|
||||
minLength: 10,
|
||||
requireUpper: true,
|
||||
requireLower: true,
|
||||
requireNumbers: true,
|
||||
requireSpecial: true,
|
||||
} as MasterPasswordPolicyOptions,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user