1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-12 14:56:58 +01:00
bitwarden-browser/libs/importer/spec/test-data/onepassword-1pux/identity-data.ts
Daniel James Smith e47415fe91
[PM-11437] 1Password 1pux importer updates and fixes (#10778)
* Replaced field trashed with state

The new field state contains either 'active' or 'archived'

Adjust all the test files to have the new field

Add unit test to verify skipping archived items on import

Fix importer

* Add addtional fields to 1pux importer types

No mapping currently necessary

* Field indexAtSource was deprecated

Removing it from the 1pux-importer-types

Updating all the test files

* Removed remaining instances of indexAtSource

* Fixed a leftover instance of trashed -> state

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-10-07 19:12:12 +02:00

452 lines
16 KiB
TypeScript

import { ExportData } from "../../../src/importers/onepassword/types/onepassword-1pux-importer-types";
export const IdentityData: ExportData = {
accounts: [
{
attrs: {
accountName: "1Password Customer",
name: "1Password Customer",
avatar: "",
email: "username123123123@gmail.com",
uuid: "TRIZ3XV4JJFRXJ3BARILLTUA6E",
domain: "https://my.1password.com/",
},
vaults: [
{
attrs: {
uuid: "pqcgbqjxr4tng2hsqt5ffrgwju",
desc: "Just test entries",
avatar: "ke7i5rxnjrh3tj6uesstcosspu.png",
name: "T's Test Vault",
type: "U",
},
items: [
{
uuid: "45mjttbbq3owgij2uis55pfrlq",
favIndex: 0,
createdAt: 1619465450,
updatedAt: 1619465789,
state: "active",
categoryUuid: "004",
details: {
loginFields: [],
notesPlain: "",
sections: [
{
title: "Identification",
name: "name",
fields: [
{
title: "first name",
id: "firstname",
value: {
string: "George",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "initial",
id: "initial",
value: {
string: "S",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "last name",
id: "lastname",
value: {
string: "Engels",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "sex",
id: "sex",
value: {
menu: "male",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "birth date",
id: "birthdate",
value: {
date: 347198460,
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "occupation",
id: "occupation",
value: {
string: "Steel Worker",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "company",
id: "company",
value: {
string: "Acme Inc.",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "department",
id: "department",
value: {
string: "QA",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "job title",
id: "jobtitle",
value: {
string: "Quality Assurance Manager",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
],
},
{
title: "Address",
name: "address",
fields: [
{
title: "address",
id: "address",
value: {
address: {
street: "1312 Main St.",
city: "Atlantis",
country: "us",
zip: "90210",
state: "California",
},
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "sentences",
},
},
{
title: "default phone",
id: "defphone",
value: {
phone: "4565555555",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "home",
id: "homephone",
value: {
phone: "4575555555",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "cell",
id: "cellphone",
value: {
phone: "4585555555",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "business",
id: "busphone",
value: {
phone: "4595555555",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
],
},
{
title: "Internet Details",
name: "internet",
fields: [
{
title: "username",
id: "username",
value: {
string: "gengels",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "reminder question",
id: "reminderq",
value: {
string: "Who's a super cool guy?",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "reminder answer",
id: "remindera",
value: {
string: "Me, buddy.",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "email",
id: "email",
value: {
string: "gengels@nullvalue.test",
},
guarded: true,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "emailAddress",
correction: "default",
capitalization: "default",
},
},
{
title: "website",
id: "website",
value: {
string: "cv.gengels.nullvalue.test",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "uRL",
correction: "default",
capitalization: "default",
},
},
{
title: "ICQ",
id: "icq",
value: {
string: "12345678",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "skype",
id: "skype",
value: {
string: "skypeisbad1619",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "AOL/AIM",
id: "aim",
value: {
string: "aollol@lololol.aol.com",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "Yahoo",
id: "yahoo",
value: {
string: "sk8rboi13@yah00.com",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "MSN",
id: "msn",
value: {
string: "msnothankyou@msn&m&m.com",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "forum signature",
id: "forumsig",
value: {
string: "super cool guy",
},
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
],
},
],
passwordHistory: [],
},
overview: {
subtitle: "George Engels",
title: "George Engels",
url: "",
ps: 0,
pbe: 0.0,
pgrng: false,
},
},
],
},
],
},
],
};