Hi there.
I’m planning to give this browser extension some very long overdue love, and update it to bring it in-line with the newer best practices around UX, privacy and transparency in terms of how browser extensions work.
You can see the code in its current state now:
And you can see some design mockups I intend to implement here:
https://miro.com/app/board/o9J_kvaKopo=/
I’m looking for help with a few things though, as I can’t find the pointers in the docs.
1. how can I simulate installation and updates programatically?
I want to implement some nice onboarding, upboarding and offboarding screens - is there a recommended way to do this?
I’m talking about working on these steps here - is there a workflow that doesn’t involve manually installing and uninstalling every time?
I’m aware of some of the triggers outlined below:
browser.runtime.onInstalled.addListener((details) => {
// (abridged code, details omitted)
switch (details.reason) {
case "install":
// show installation onboarding page
browser.tabs.create({
url: browser.runtime.getURL("/views/installation/index.html"),
active: true
});
break;
case "update":
// show update notification
displayNotification(title, updateMessage)
break;
}
});
});
But I’m not aware how to trigger these programaticaly when using something like web-ext. Is there a way to do this?
2. How should I test this?
Is there a way to test this, so I use CI to check that these screens show during installation or update steps?