1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-09 09:51:02 +01:00
bitwarden-browser/libs/common/spec/importers/test-data/psono-json/folders.ts
Daniel James Smith b1a1068906
[PS-2096] BEEEEP: Add Psono importer (#4286)
* Add psono json importer

Create types for psono export format
Add test files
Write tests for psono-json-importer
Write importer for psono export
Register 'psonojson' with `importOptions`
Import/register psono-json-importer with import.service
Add instructions on how to export from Psono

* Retain all imported data

Ensure all data is retained by adding unmapped properties into custom fields
Each item type has a set of mapped properties, anything not matching will be created as a custom field
Write extensive tests to ensure data is present

* Skipping GPG

We currently cannot import GPG Keys into notes or custom fields

* Add organizational test

Verify that folders get converted to collections when imported by an org

* Remove combined test-file (whole export)

* Remove redundant null type
2023-01-30 13:56:49 +01:00

54 lines
1.7 KiB
TypeScript

import { PsonoJsonExport } from "@bitwarden/common/importers/psono/psono-json-types";
export const FoldersTestData: PsonoJsonExport = {
folders: [
{
name: "TestFolder",
items: [
{
type: "website_password",
name: "TestEntry",
autosubmit: true,
urlfilter: "filter",
website_password_title: "TestEntry",
website_password_url: "bitwarden.com",
website_password_username: "testUser",
website_password_password: "testPassword",
website_password_notes: "some notes",
website_password_auto_submit: true,
website_password_url_filter: "filter",
create_date: "2022-12-13T19:24:09.810266Z",
write_date: "2022-12-13T19:24:09.810292Z",
callback_url: "callback",
callback_user: "callbackUser",
callback_pass: "callbackPassword",
},
],
},
{
name: "TestFolder2",
items: [
{
type: "website_password",
name: "TestEntry2",
autosubmit: true,
urlfilter: "filter",
website_password_title: "TestEntry2",
website_password_url: "bitwarden.com",
website_password_username: "testUser",
website_password_password: "testPassword",
website_password_notes: "some notes",
website_password_auto_submit: true,
website_password_url_filter: "filter",
create_date: "2022-12-13T19:24:09.810266Z",
write_date: "2022-12-13T19:24:09.810292Z",
callback_url: "callback",
callback_user: "callbackUser",
callback_pass: "callbackPassword",
},
],
},
],
items: [],
};