Skip to content
Draft
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

285 changes: 0 additions & 285 deletions app/src/main/res/layout/widget_static_configure.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package io.homeassistant.companion.android.widgets.entity

import androidx.compose.runtime.Composable
import com.android.tools.screenshot.PreviewTest
import io.homeassistant.companion.android.common.compose.theme.HAThemeForPreview
import io.homeassistant.companion.android.database.widget.WidgetBackgroundType
import io.homeassistant.companion.android.database.widget.WidgetTapAction
import io.homeassistant.companion.android.util.compose.HAPreviews
import io.homeassistant.companion.android.util.previewEntity1
import io.homeassistant.companion.android.util.previewServer1
import io.homeassistant.companion.android.util.previewServer2

class EntityWidgetConfigureScreenshotTest {

@PreviewTest
@HAPreviews
@Composable
fun `EntityWidgetConfigureView`() {
HAThemeForPreview {
EntityWidgetConfigureView(
servers = listOf(previewServer1, previewServer2),
viewState = EntityWidgetConfigureViewState(
selectedServerId = previewServer1.id,
selectedEntityId = previewEntity1.entityId,
appendAttributes = true,
selectedAttributeIds = listOf("brightness"),
label = "Office light",
textSize = "30",
stateSeparator = " - ",
attributeSeparator = ", ",
selectedTapAction = WidgetTapAction.TOGGLE,
selectedBackgroundType = WidgetBackgroundType.TRANSPARENT,
selectedTextColor = EntityWidgetTextColor.WHITE,
),
onServerSelected = {},
entities = listOf(previewEntity1),
onEntitySelected = {},
availableAttributes = listOf("brightness", "friendly_name"),
onAppendAttributesChanged = {},
onAttributeAdded = {},
onAttributeRemoved = {},
onCustomAttributeChanged = {},
onCustomAttributesAdded = {},
onLabelChanged = {},
onTextSizeChanged = {},
onStateSeparatorChanged = {},
onAttributeSeparatorChanged = {},
isToggleable = true,
onTapActionSelected = {},
onBackgroundTypeSelected = {},
dynamicColorAvailable = true,
onTextColorSelected = {},
onErrorShown = {},
onActionClick = {},
)
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is something wrong with the color for the friendly_name

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading