mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 11:13:46 +00:00
encrypted import for bitwarden json (#220)
This commit is contained in:
@@ -192,7 +192,7 @@ line2</Value>
|
||||
describe('KeePass2 Xml Importer', () => {
|
||||
it('should parse XML data', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(TestData);
|
||||
const result = await importer.parse(TestData);
|
||||
expect(result != null).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -163,7 +163,7 @@ describe('Lastpass CSV Importer', () => {
|
||||
CipherData.forEach((data) => {
|
||||
it(data.title, async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(data.csv);
|
||||
const result = await importer.parse(data.csv);
|
||||
expect(result != null).toBe(true);
|
||||
expect(result.ciphers.length).toBeGreaterThan(0);
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ const IdentityTestData = JSON.stringify({
|
||||
describe('1Password 1Pif Importer', () => {
|
||||
it('should parse data', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(TestData);
|
||||
const result = await importer.parse(TestData);
|
||||
expect(result != null).toBe(true);
|
||||
|
||||
const cipher = result.ciphers.shift();
|
||||
@@ -447,7 +447,7 @@ describe('1Password 1Pif Importer', () => {
|
||||
|
||||
it('should create concealed field as "hidden" type', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(TestData);
|
||||
const result = await importer.parse(TestData);
|
||||
expect(result != null).toBe(true);
|
||||
|
||||
const ciphers = result.ciphers;
|
||||
@@ -465,7 +465,7 @@ describe('1Password 1Pif Importer', () => {
|
||||
|
||||
it('should create identity records', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(IdentityTestData);
|
||||
const result = await importer.parse(IdentityTestData);
|
||||
expect(result != null).toBe(true);
|
||||
const cipher = result.ciphers.shift();
|
||||
expect(cipher.name).toEqual('Test Identity');
|
||||
@@ -488,7 +488,7 @@ describe('1Password 1Pif Importer', () => {
|
||||
|
||||
it('should create password history', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(TestData);
|
||||
const result = await importer.parse(TestData);
|
||||
const cipher = result.ciphers.shift();
|
||||
|
||||
expect(cipher.passwordHistory.length).toEqual(1);
|
||||
@@ -499,7 +499,7 @@ describe('1Password 1Pif Importer', () => {
|
||||
|
||||
it('should create password history from windows opvault 1pif format', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(WindowsOpVaultTestData);
|
||||
const result = await importer.parse(WindowsOpVaultTestData);
|
||||
const cipher = result.ciphers.shift();
|
||||
|
||||
expect(cipher.passwordHistory.length).toEqual(5);
|
||||
|
||||
@@ -6,9 +6,9 @@ import { data as creditCardData } from './testData/onePasswordCsv/creditCard.csv
|
||||
import { data as identityData } from './testData/onePasswordCsv/identity.csv'
|
||||
|
||||
describe('1Password CSV Importer', () => {
|
||||
it('should parse identity imports', () => {
|
||||
it('should parse identity imports', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(identityData);
|
||||
const result = await importer.parse(identityData);
|
||||
|
||||
expect(result).not.toBeNull();
|
||||
expect(result.success).toBe(true);
|
||||
@@ -29,9 +29,9 @@ describe('1Password CSV Importer', () => {
|
||||
expect(cipher.notes).toContain('address\ncity state zip\nUnited States');
|
||||
});
|
||||
|
||||
it('should parse credit card imports', () => {
|
||||
it('should parse credit card imports', async () => {
|
||||
const importer = new Importer();
|
||||
const result = importer.parse(creditCardData);
|
||||
const result = await importer.parse(creditCardData);
|
||||
|
||||
expect(result).not.toBeNull();
|
||||
expect(result.success).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user