1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[PS-1306] Context Menu for MV3 (#3910)

* Add combine helper

* Helper for running multiple actions with single service cache

* Remove unneeded any

* Send identifier through callback

* Extend Tab Message

* Split out ContextMenu logic

* Add tests for ContextMenu actions

* Context Menu Fixes

* Await call to menu handler
* set onUpdatedRan to false when it's ran

* Switch to using new cache per run

* Fix Generate Password Test

* Remove old file from whitelist

* Remove Useless never from Generic

* Update apps/browser/src/background/main.background.ts

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Address PR Feedback

* Specify a Document Url for Context Menu Items

* Update Test

* Use Generate Password Callback

* Remove DocumentUrlPatterns

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
This commit is contained in:
Justin Baur
2023-01-06 19:31:32 -05:00
committed by GitHub
parent 574c18ba3f
commit d79fd7f417
25 changed files with 1360 additions and 460 deletions

View File

@@ -25,8 +25,14 @@ const runtime = {
getManifest: jest.fn(),
};
const contextMenus = {
create: jest.fn(),
removeAll: jest.fn(),
};
// set chrome
global.chrome = {
storage,
runtime,
contextMenus,
} as any;