Skip to content

Commit

Permalink
Update tests. Bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Mar 14, 2021
1 parent 2fc1bbb commit 7c775a1
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 121 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ layout:
"header header header header"
"main main . sidebar"
"footer footer footer footer"
badges: []
cards:
- type: entities
entities:
Expand Down
2 changes: 1 addition & 1 deletion layout-card.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "layout-card",
"version": "2.0.0b0",
"version": "2.0.0",
"description": "",
"private": true,
"scripts": {
Expand Down
4 changes: 0 additions & 4 deletions test/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ demo:
lovelace:
mode: storage
dashboards:
lovelace-yaml:
mode: yaml
title: yaml
filename: test/lovelace.yaml
lovelace-views:
mode: yaml
title: views
Expand Down
37 changes: 0 additions & 37 deletions test/lovelace/card-list-breaks.yaml

This file was deleted.

21 changes: 10 additions & 11 deletions test/lovelace/card-list.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
- type: entities
title: 1
title: '1'
entities:
- light.bed_light
- type: entities
title: 2
title: '2'
entities:
- light.bed_light
- type: entities
title: 3
title: '3'
entities:
- light.bed_light
- type: entities
title: 4
title: '4'
entities:
- light.bed_light
- light.bed_light
- light.bed_light
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
- type: entities
title: 5
title: '5'
entities:
- light.bed_light
- type: entities
title: 6
title: '6'
entities:
- light.bed_light
- type: entities
title: 7
title: '7'
entities:
- light.bed_light
- type: entities
title: 8
title: '8'
entities:
- light.bed_light
49 changes: 25 additions & 24 deletions test/lovelace/grid-view.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
title: Grid
type: custom:grid-layout
layout:
grid-template-columns: 200px auto 500px
grid-template-columns: 25% 25% 25% 25%
grid-template-rows: auto
grid-template-areas: |
"header header header header"
"main main . sidebar"
"footer footer footer footer"
cards:
- type: entities
title: 1
entities:
- light.bed_light
- type: entities
title: 2
- entity: light.bed_light
title: '1'
show_header_toggle: false
layout:
grid-column: 2
grid-row: 1/3
entities:
- light.bed_light
- type: entities
title: 3
entities:
- light.bed_light

grid-area: header
- type: entities
title: 4
entities:
- light.bed_light
- entity: light.bed_light
title: '2'
show_header_toggle: false
layout:
grid-area: footer
- type: entities
title: 5
entities:
- light.bed_light
- entity: light.bed_light
title: '3'
show_header_toggle: false
layout:
grid-area: sidebar
- type: entities
title: 6
entities:
- light.bed_light
- type: entities
title: 7
- light.ceiling_lights
- light.kitchen_lights
title: '4'
show_header_toggle: false
layout:
grid-column: 2/4
entities:
- light.bed_light
grid-area: main
12 changes: 12 additions & 0 deletions test/lovelace/layout-break.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
title: layout-break
type: custom:vertical-layout
cards:
- <<: &card
type: entities
entities:
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
- type: custom:layout-break
- <<: *card
- <<: *card
7 changes: 3 additions & 4 deletions test/lovelace/layout-card.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ cards:
- type: custom:layout-card
cards: !include card-list.yaml
- type: custom:layout-card
layout:
type: custom:masonry-layout
cards: !include card-list.yaml
- type: custom:layout-card
layout_type: masonry
cards: !include card-list.yaml
- type: custom:layout-card
layout_type: horizontal
cards: !include card-list.yaml
- type: custom:layout-card
layout_type: vertical
cards: !include card-list.yaml
21 changes: 21 additions & 0 deletions test/lovelace/media-query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title: Mediaquery
type: custom:masonry-layout
cards:
- type: markdown
content: |
This is only shown on screens more than 800 px wide
layout:
show:
mediaquery: "(min-width: 800px)"
- type: markdown
content: |
This is only shown on screens less than 400 px wide
layout:
show:
mediaquery: "(max-width: 400px)"
- type: markdown
content: |
This is only shown on touch screen devices
layout:
show:
mediaquery: "(pointer: coarse)"
57 changes: 19 additions & 38 deletions test/lovelace/view.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,33 @@ title: layout-card
views:
- title: Core
cards: !include card-list.yaml

- title: Masonry
type: custom:masonry-layout
cards: !include card-list.yaml

- title: Horizontal
type: custom:horizontal-layout
cards: !include card-list.yaml

- title: Vertical
type: custom:vertical-layout
cards: !include card-list.yaml
- title: Grid
type: custom:grid-layout
cards: !include card-list.yaml

# - title: Masonry2
# type: custom:masonry-layout
# layout:
# width: 200
# max_cols: 7
# min_height: 1
# cards: *cards

# - title: Panel
# panel: true
# cards:
# - type: custom:layout-card
# cards: !include card-list.yaml

# - title: Horizontal
# type: custom:horizontal-layout
# cards: *cards
# - title: Horizontal2
# type: custom:horizontal-layout
# cards: *cards
# layout:
# width: 200
# max_cols: 6
# - title: Horizontal-break
# type: custom:horizontal-layout
# cards: *breakcards
- !include grid-view.yaml

# - title: Vertical
# type: custom:vertical-layout
# cards: *cards
# - title: Vertical-break
# type: custom:vertical-layout
# cards: *breakcards

# - !include grid-view.yaml
# - !include layout-card.yaml
- title: Options
type: custom:masonry-layout
layout:
width: 200
max_cols: 10
min_height: 1
cards: !include card-list.yaml
- title: rtl
type: custom:masonry-layout
layout:
rtl: true
cards: !include card-list.yaml
- !include layout-card.yaml
- !include layout-break.yaml
- !include media-query.yaml

0 comments on commit 7c775a1

Please sign in to comment.