1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

[PM-25388] - remove reference to android/ios icons (#17763)

* remove android/ios icons as they're not in the icon lib

* fix tests
This commit is contained in:
Jordan Aasen
2025-12-11 15:45:32 -08:00
committed by GitHub
parent 9f1496b218
commit d779304285
2 changed files with 26 additions and 23 deletions

View File

@@ -13,18 +13,19 @@ describe("buildCipherIcon", () => {
}, },
} as any as CipherView; } as any as CipherView;
it.each([true, false])("handles android app URIs for showFavicon setting %s", (showFavicon) => { // @TODO Uncomment once we have Android and iOS icons https://bitwarden.atlassian.net/browse/PM-29028
setUri("androidapp://test.example"); // it.each([true, false])("handles android app URIs for showFavicon setting %s", (showFavicon) => {
// setUri("androidapp://test.example");
const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon); // const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon);
expect(iconDetails).toEqual({ // expect(iconDetails).toEqual({
icon: "bwi-android", // icon: "bwi-android",
image: null, // image: null,
fallbackImage: "", // fallbackImage: "",
imageEnabled: showFavicon, // imageEnabled: showFavicon,
}); // });
}); // });
it("does not mark as an android app if the protocol is not androidapp", () => { it("does not mark as an android app if the protocol is not androidapp", () => {
// This weird URI points to test.androidapp with a default port and path of /.example // This weird URI points to test.androidapp with a default port and path of /.example
@@ -40,18 +41,18 @@ describe("buildCipherIcon", () => {
}); });
}); });
it.each([true, false])("handles ios app URIs for showFavicon setting %s", (showFavicon) => { // @TODO Uncomment once we have Android and iOS icons https://bitwarden.atlassian.net/browse/PM-29028
setUri("iosapp://test.example"); // it.each([true, false])("handles ios app URIs for showFavicon setting %s", (showFavicon) => {
// setUri("iosapp://test.example");
const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon); // const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon);
// expect(iconDetails).toEqual({
expect(iconDetails).toEqual({ // icon: "bwi-apple",
icon: "bwi-apple", // image: null,
image: null, // fallbackImage: "",
fallbackImage: "", // imageEnabled: showFavicon,
imageEnabled: showFavicon, // });
}); // });
});
it("does not mark as an ios app if the protocol is not iosapp", () => { it("does not mark as an ios app if the protocol is not iosapp", () => {
// This weird URI points to test.iosapp with a default port and path of /.example // This weird URI points to test.iosapp with a default port and path of /.example

View File

@@ -49,10 +49,12 @@ export function buildCipherIcon(
let isWebsite = false; let isWebsite = false;
if (hostnameUri.indexOf("androidapp://") === 0) { if (hostnameUri.indexOf("androidapp://") === 0) {
icon = "bwi-android"; // @TODO Re-add once we have Android icon https://bitwarden.atlassian.net/browse/PM-29028
// icon = "bwi-android";
image = null; image = null;
} else if (hostnameUri.indexOf("iosapp://") === 0) { } else if (hostnameUri.indexOf("iosapp://") === 0) {
icon = "bwi-apple"; // @TODO Re-add once we have iOS icon https://bitwarden.atlassian.net/browse/PM-29028
// icon = "bwi-apple";
image = null; image = null;
} else if ( } else if (
showFavicon && showFavicon &&