mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 02:06:42 +00:00
Rename whitelist error to allowed (#6372)
This commit is contained in:
parent
e2cba90f8d
commit
2f7d744228
@ -2319,7 +2319,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"abort": {
|
"abort": {
|
||||||
"not_whitelisted": "Your computer is not whitelisted."
|
"not_allowed": "Your computer is not allowed."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,14 +13,14 @@ describe("EntityFilter", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// case 2
|
// case 2
|
||||||
it("allows whitelisting entities by entity id", () => {
|
it("allows entities by entity id", () => {
|
||||||
const filter = generateFilter(undefined, ["light.kitchen"]);
|
const filter = generateFilter(undefined, ["light.kitchen"]);
|
||||||
|
|
||||||
assert(filter("light.kitchen"));
|
assert(filter("light.kitchen"));
|
||||||
assert(!filter("light.living_room"));
|
assert(!filter("light.living_room"));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows whitelisting entities by domain", () => {
|
it("allows entities by domain", () => {
|
||||||
const filter = generateFilter(["switch"]);
|
const filter = generateFilter(["switch"]);
|
||||||
|
|
||||||
assert(filter("switch.bla"));
|
assert(filter("switch.bla"));
|
||||||
@ -28,7 +28,7 @@ describe("EntityFilter", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// case 3
|
// case 3
|
||||||
it("allows blacklisting entities by entity id", () => {
|
it("excluding entities by entity id", () => {
|
||||||
const filter = generateFilter(undefined, undefined, undefined, [
|
const filter = generateFilter(undefined, undefined, undefined, [
|
||||||
"light.kitchen",
|
"light.kitchen",
|
||||||
]);
|
]);
|
||||||
@ -37,7 +37,7 @@ describe("EntityFilter", () => {
|
|||||||
assert(filter("light.living_room"));
|
assert(filter("light.living_room"));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows blacklisting entities by domain", () => {
|
it("excluding entities by domain", () => {
|
||||||
const filter = generateFilter(undefined, undefined, ["switch"]);
|
const filter = generateFilter(undefined, undefined, ["switch"]);
|
||||||
|
|
||||||
assert(!filter("switch.bla"));
|
assert(!filter("switch.bla"));
|
||||||
@ -45,7 +45,7 @@ describe("EntityFilter", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// case 4a
|
// case 4a
|
||||||
it("allows whitelisting domain and blacklisting entity", () => {
|
it("allows domain and excluding entity", () => {
|
||||||
const filter = generateFilter(["switch"], undefined, undefined, [
|
const filter = generateFilter(["switch"], undefined, undefined, [
|
||||||
"switch.kitchen",
|
"switch.kitchen",
|
||||||
]);
|
]);
|
||||||
@ -55,7 +55,7 @@ describe("EntityFilter", () => {
|
|||||||
assert(!filter("sensor.bla"));
|
assert(!filter("sensor.bla"));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows whitelisting entity while whitelisting other domains", () => {
|
it("allows entity while other domains", () => {
|
||||||
const filter = generateFilter(["switch"], ["light.kitchen"]);
|
const filter = generateFilter(["switch"], ["light.kitchen"]);
|
||||||
|
|
||||||
assert(filter("switch.living_room"));
|
assert(filter("switch.living_room"));
|
||||||
@ -64,7 +64,7 @@ describe("EntityFilter", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// case 4b
|
// case 4b
|
||||||
it("allows blacklisting domain and whitelisting entity", () => {
|
it("excluding domain and entity", () => {
|
||||||
const filter = generateFilter(undefined, ["switch.kitchen"], ["switch"]);
|
const filter = generateFilter(undefined, ["switch.kitchen"], ["switch"]);
|
||||||
|
|
||||||
assert(filter("switch.kitchen"));
|
assert(filter("switch.kitchen"));
|
||||||
@ -72,7 +72,7 @@ describe("EntityFilter", () => {
|
|||||||
assert(filter("sensor.bla"));
|
assert(filter("sensor.bla"));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows blacklisting domain and excluding entities", () => {
|
it("excluding domain and excluding entities", () => {
|
||||||
const filter = generateFilter(
|
const filter = generateFilter(
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
@ -86,7 +86,7 @@ describe("EntityFilter", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// case 4c
|
// case 4c
|
||||||
it("allows whitelisting entities", () => {
|
it("allows entities", () => {
|
||||||
const filter = generateFilter(undefined, ["light.kitchen"]);
|
const filter = generateFilter(undefined, ["light.kitchen"]);
|
||||||
|
|
||||||
assert(filter("light.kitchen"));
|
assert(filter("light.kitchen"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user