1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00
Files
browser/libs/common/src/importers/fsecure/fsk-test-data.ts
Daniel James Smith d6acc77ba7 [PS-1755] BEEEP: FSecure FSK-Importer improvements (#3877)
* Move FsecureFskImporter into separate folder

* Add types for exported fsk file

* Add new testdata and rewrite existing tests

* Fix #2801 - Use type instead of style property to differentiate between cipher types

* Add setting cipher.favorite

* Remove unmapped property autofillAndroid

* Re-naming files due to new naming convention

Renamed added or changed files of this PR
Fixed all imports
Removed items from the whitelist

* Extract method refactor

Move logic inside of parse loop into parseEntry
Extract handling of Entries of type Login into handleLoginEntry
Extract handling of Entries of type CreditCard into handleCreditCardEntry

* Simplify folder structure

Use vendor name importer folder
Rename /importers/fsecureImporters to /importers/fsecure
Move fsecure-fsk-types.ts out of the types folder into the fsecure-folder
Delete types folder
Fix all the imports

* Move spec and test-data to fsecure importer

* Fix broken import after merge master

* Use the new FSecureFskImporter

Must have messed up during the last merge:
Delete old importer and spec
Fix import of FSecureFskImporter in import.service
2022-12-22 16:59:46 +01:00

50 lines
1.2 KiB
TypeScript

import { FskFile } from "./fsecure-fsk-types";
export const LoginTestEntry: FskFile = {
data: {
"1c3a2e31dcaa8459edd70a9d895ce298": {
color: "#00A34D",
createdDate: 0,
creditCvv: "",
creditExpiry: "",
creditNumber: "",
favorite: 1666440874,
modifiedDate: 0,
notes: "some note for example.com",
password: "somePassword",
passwordList: [],
passwordModifiedDate: 0,
rev: 1,
service: "example.com",
style: "website",
type: 1,
url: "https://www.example.com",
username: "jdoe",
},
},
};
export const CreditCardTestEntry: FskFile = {
data: {
"156498a46a3254f16035cbbbd09c2b8f": {
color: "#00baff",
createdDate: 1666438977,
creditCvv: "123",
creditExpiry: "22.10.2026",
creditNumber: "4242424242424242",
favorite: 0,
modifiedDate: 1666438977,
notes: "some notes to my card",
password: "1234",
passwordList: [],
passwordModifiedDate: 1666438977,
rev: 1,
service: "My credit card",
style: "creditcard",
type: 2,
url: "mybank",
username: "John Doe",
},
},
};