1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02:00
bitwarden-browser/libs/importer/spec
Daniel James Smith cf2d8b266a
[PM-1071] Display import-details-dialog on successful import (#4817)
* Prefer callback over error-flow to prompt for password

Remove error-flow to request file password
Prefer callback, which has to be provided when retrieving/creating an instance.
Delete ImportError
Call BitwardenPasswordProtector for all Bitwarden json imports, as it extends BitwardenJsonImporter
Throw errors instead of returning
Return ImportResult
Fix and extend tests import.service
Replace "@fluffy-spoon/substitute" with "jest-mock-extended"

* Fix up test cases

Delete bitwarden-json-importer.spec.ts
Add test case to ensure bitwarden-json-importer.ts is called given unencrypted or account-protected files

* Move file-password-prompt into dialog-folder

* Add import success dialog

* Fix typo

* Only list the type when at least one got imported

* update copy based on design feedback

* Remove unnecessary /index import

* Remove promptForPassword_callback from interface

PR feedback from @MGibson1 that giving every importer the ability to request a password is unnecessary. Instead, we can pass the callback into the constructor for every importer that needs this functionality

* Remove unneeded import of BitwardenJsonImporter

* Fix spec constructor

* Fixed organizational import

Added an else statement, or else we'd import into an org and then also import into an individual vault
2023-04-06 22:41:09 +02:00
..
test-data [PM-1071] Display import-details-dialog on successful import (#4817) 2023-04-06 22:41:09 +02:00
bitwarden-password-protected-importer.spec.ts [PM-1071] Display import-details-dialog on successful import (#4817) 2023-04-06 22:41:09 +02:00
chrome-csv-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
dashlane-csv-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
enpass-json-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
firefox-csv-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
keepass2-xml-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
keeper-csv-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
keeper-json-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
lastpass-csv-importer.spec.ts [AC-1266] Enums filename conventions (#5140) 2023-04-04 22:42:21 -05:00
myki-csv-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
nordpass-csv-importer.spec.ts [AC-1266] Enums filename conventions (#5140) 2023-04-04 22:42:21 -05:00
onepassword-1pif-importer.spec.ts [AC-1266] Enums filename conventions (#5140) 2023-04-04 22:42:21 -05:00
onepassword-1pux-importer.spec.ts [AC-1266] Enums filename conventions (#5140) 2023-04-04 22:42:21 -05:00
onepassword-mac-csv-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
onepassword-win-csv-importer.spec.ts [AC-1266] Enums filename conventions (#5140) 2023-04-04 22:42:21 -05:00
passky-json-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00
psono-json-importer.spec.ts [AC-1266] Enums filename conventions (#5140) 2023-04-04 22:42:21 -05:00
safari-csv-importer.spec.ts [PM-328] Move common/importer to libs/importer (tools-migration) (#5060) 2023-03-23 11:43:27 +01:00