mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
[PM-9190] Edit Login - Autofill Options (#10274)
* [PM-8524] Update appA11yTitle to keep attributes in sync after first render * [PM-8524] Introduce UriOptionComponent * [PM-9190] Introduce AutofillOptionsComponent * [PM-9190] Add AutofillOptions to LoginDetailsSection * [PM-9190] Add autofill options component unit tests * [PM-9190] Add UriOptionComponent unit tests * [PM-9190] Add missing translations * [PM-9190] Add autofill on page load field * [PM-9190] Ensure updatedCipherView is completely separate from originalCipherView * [CL-348] Do not override items if there are no OptionComponents available * [PM-9190] Mock AutoFillOptions component in Login Details tests * [PM-9190] Cleanup storybook and missing web translations * [PM-9190] Ensure storybook decryptCipher returns a separate object
This commit is contained in:
@@ -11,6 +11,9 @@ import { BehaviorSubject } from "rxjs";
|
||||
|
||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { AutofillSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/autofill-settings.service";
|
||||
import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service";
|
||||
import { UriMatchStrategy } from "@bitwarden/common/models/domain/domain-service";
|
||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
@@ -96,7 +99,7 @@ const defaultConfig: CipherFormConfig = {
|
||||
|
||||
class TestAddEditFormService implements CipherFormService {
|
||||
decryptCipher(): Promise<CipherView> {
|
||||
return Promise.resolve(defaultConfig.originalCipher as any);
|
||||
return Promise.resolve({ ...defaultConfig.originalCipher } as any);
|
||||
}
|
||||
async saveCipher(cipher: CipherView): Promise<CipherView> {
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
@@ -151,6 +154,18 @@ export default {
|
||||
passwordLeaked: () => Promise.resolve(0),
|
||||
},
|
||||
},
|
||||
{
|
||||
provide: DomainSettingsService,
|
||||
useValue: {
|
||||
defaultUriMatchStrategy$: new BehaviorSubject(UriMatchStrategy.StartsWith),
|
||||
},
|
||||
},
|
||||
{
|
||||
provide: AutofillSettingsServiceAbstraction,
|
||||
useValue: {
|
||||
autofillOnPageLoadDefault$: new BehaviorSubject(true),
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
componentWrapperDecorator(
|
||||
|
||||
Reference in New Issue
Block a user