mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-15 07:25:54 +00:00
Always use fallback for brands URL (#28994)
This commit is contained in:
@@ -2,40 +2,26 @@ import { assert, describe, it } from "vitest";
|
||||
import { brandsUrl } from "../../src/util/brands-url";
|
||||
|
||||
describe("Generate brands Url", () => {
|
||||
it("Generate logo brands url for cloud component without fallback", () => {
|
||||
it("Generate logo brands url for cloud component", () => {
|
||||
assert.strictEqual(
|
||||
// @ts-ignore
|
||||
brandsUrl({ domain: "cloud", type: "logo" }),
|
||||
"https://brands.home-assistant.io/cloud/logo.png"
|
||||
);
|
||||
});
|
||||
it("Generate icon brands url for cloud component without fallback", () => {
|
||||
assert.strictEqual(
|
||||
// @ts-ignore
|
||||
brandsUrl({ domain: "cloud", type: "icon" }),
|
||||
"https://brands.home-assistant.io/cloud/icon.png"
|
||||
);
|
||||
});
|
||||
it("Generate logo brands url for cloud component with fallback", () => {
|
||||
assert.strictEqual(
|
||||
// @ts-ignore
|
||||
brandsUrl({ domain: "cloud", type: "logo", useFallback: true }),
|
||||
"https://brands.home-assistant.io/_/cloud/logo.png"
|
||||
);
|
||||
});
|
||||
it("Generate icon brands url for cloud component with fallback", () => {
|
||||
it("Generate icon brands url for cloud component", () => {
|
||||
assert.strictEqual(
|
||||
// @ts-ignore
|
||||
brandsUrl({ domain: "cloud", type: "icon", useFallback: true }),
|
||||
brandsUrl({ domain: "cloud", type: "icon" }),
|
||||
"https://brands.home-assistant.io/_/cloud/icon.png"
|
||||
);
|
||||
});
|
||||
|
||||
it("Generate dark theme optimized logo brands url for cloud component without fallback", () => {
|
||||
it("Generate dark theme optimized logo brands url for cloud component", () => {
|
||||
assert.strictEqual(
|
||||
// @ts-ignore
|
||||
brandsUrl({ domain: "cloud", type: "logo", darkOptimized: true }),
|
||||
"https://brands.home-assistant.io/cloud/dark_logo.png"
|
||||
"https://brands.home-assistant.io/_/cloud/dark_logo.png"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user