1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-13 10:24:20 +01:00
bitwarden-browser/libs/common/spec/importers/enpass/test-data/json/login-android-url.ts
Daniel James Smith ae3edcc34d
[PS-2108] Enpass importer add support for androidurl's (#4314)
* Move and rename importers ater new naming convention

Create a subfolder to hold all enpass-importers
Change names to new naming convention
Fix imports
Remove entries from whitelist

* Added types for exported enpass json file

* Add unit tests to verify for current behaviour

* Prefer types over enums

* Replace `any` types with defined Enpass types

* Add support for parsing Android urls

Fixes #2831
Added test-file with several combinations
Wrote test cases to verify
2023-01-24 21:03:11 +01:00

80 lines
2.0 KiB
TypeScript

import { EnpassJsonFile } from "@bitwarden/common/importers/enpass/types/enpass-json-type";
import { login } from "./login";
export const loginAndroidUrl: EnpassJsonFile = {
folders: [],
items: [
{
archived: 0,
auto_submit: 1,
category: "login",
createdAt: 1666449561,
favorite: 1,
fields: [
...login.items[0].fields,
{
deleted: 0,
label: "Autofill Info",
order: 9,
sensitive: 0,
type: ".Android#",
uid: 7696,
updated_at: 1666551057,
value: "com.amazon.0",
value_updated_at: 1666551057,
},
{
deleted: 0,
label: "Autofill Info 1",
order: 9,
sensitive: 0,
type: ".Android#",
uid: 7696,
updated_at: 1666551057,
value:
"android://pMUhLBalOhcc3yK-84sMiGc2U856FVVUhm8PZveoRfNFT3ocT1KWZlciAkF2ED--B5i_fMuNlC6JfPxcHk1AQg==@com.amazon.1",
value_updated_at: 1666551057,
},
{
deleted: 0,
label: "Autofill Info2 ",
order: 9,
sensitive: 0,
type: ".Android#",
uid: 7696,
updated_at: 1666551057,
value: "android://com.amazon.2",
value_updated_at: 1666551057,
},
{
deleted: 0,
label: "Autofill Info 3",
order: 9,
sensitive: 0,
type: ".Android#",
uid: 7696,
updated_at: 1666551057,
value: "androidapp://com.amazon.3",
value_updated_at: 1666551057,
},
],
icon: {
fav: "www.amazon.com",
image: {
file: "web/amazon.com",
},
type: 1,
uuid: "",
},
note: "some notes on the login item",
subtitle: "emily@enpass.io",
template_type: "login.default",
title: "Amazon",
trashed: 0,
updated_at: 1666449561,
uuid: "f717cb7c-6cce-4b24-b023-ec8a429cc992",
},
],
};