mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
v1.60.0-beta.1: unify background editing and device deletion
This commit is contained in:
@@ -17,6 +17,7 @@ test('optimizePlans migrates, aligns and canonicalises idempotently', () => {
|
||||
const config = {
|
||||
spaces: [{
|
||||
id: 'f1', title: 'Floor', view_box: [0, 0, 1, 1], cell_cm: 5,
|
||||
plan_scale: 0.75,
|
||||
segments: [[0, 0, 1, 0]],
|
||||
rooms: [room('a', 0, 0.5, 'b'), room('b', 0.5, 1, 'a')],
|
||||
walls: [
|
||||
@@ -26,6 +27,8 @@ test('optimizePlans migrates, aligns and canonicalises idempotently', () => {
|
||||
decor: [{
|
||||
id: 't1', kind: 'text', x: S / 3, y: S / 3,
|
||||
text: 'Now {}', entity: 'sensor.temp', attr: 'state', size: 'm',
|
||||
}, {
|
||||
id: 'l1', kind: 'line', x1: 0, y1: 0, x2: 1, y2: 0, width: 3,
|
||||
}],
|
||||
}],
|
||||
markers: [{
|
||||
@@ -43,7 +46,13 @@ test('optimizePlans migrates, aligns and canonicalises idempotently', () => {
|
||||
assert.equal(first.config.markers[0].display, 'icon_ripple');
|
||||
assert.deepEqual(first.config.markers[0].vacuum, { trail_mode: 'never' });
|
||||
assert.equal(first.config.spaces[0].decor[0].text, 'Now {sensor.temp}');
|
||||
assert.equal(first.config.spaces[0].decor[0].scale, 1);
|
||||
assert.equal(first.config.spaces[0].decor[0].size_cm, 24);
|
||||
assert.equal('scale' in first.config.spaces[0].decor[0], false);
|
||||
assert.equal(first.config.spaces[0].decor[1].width_cm, 3.6);
|
||||
assert.equal('width' in first.config.spaces[0].decor[1], false);
|
||||
assert.equal(first.config.spaces[0].plan_scale_x, 0.75);
|
||||
assert.equal(first.config.spaces[0].plan_scale_y, 0.75);
|
||||
assert.equal('plan_scale' in first.config.spaces[0], false);
|
||||
assert.equal('entity' in first.config.spaces[0].decor[0], false);
|
||||
assert.equal(first.config.spaces[0].open_spans.length, 1);
|
||||
assert.equal(first.config.spaces[0].walls.length, 1);
|
||||
|
||||
Reference in New Issue
Block a user