match the remaining app bar titles and cover the switch off state

This commit is contained in:
austinried
2026-10-04 00:29:54 +00:00
parent 94c0210135
commit d7434b80cc
3 changed files with 16 additions and 3 deletions
@@ -322,7 +322,7 @@ fun QueueScreen(
modifier = modifier,
topBar = {
TopAppBar(
title = { Text("Queue") },
title = { Text("Queue", style = MaterialTheme.typography.headlineMedium) },
navigationIcon = {
IconButton(onClick = onBack) {
Icon(Icons.AutoMirrored.Rounded.ArrowBack, contentDescription = "Back")
@@ -73,7 +73,7 @@ fun AddSourceScreen(
modifier = modifier,
topBar = {
TopAppBar(
title = { Text("Add server") },
title = { Text("Add server", style = MaterialTheme.typography.headlineMedium) },
navigationIcon = {
if (onBack != null) {
IconButton(onClick = onBack) {
@@ -217,6 +217,18 @@ class AppScreenshotTest {
@Test
fun addSource() {
captureAddSource(useTokenAuth = true, file = "src/test/screenshots/add_source.png")
}
@Test
fun addSourceTokenAuthOff() {
captureAddSource(useTokenAuth = false, file = "src/test/screenshots/add_source_off.png")
}
private fun captureAddSource(
useTokenAuth: Boolean,
file: String,
) {
composeRule.setContent {
SubtracksTheme {
AddSourceScreen(
@@ -226,6 +238,7 @@ class AppScreenshotTest {
address = "https://music.example.com",
username = "austin",
password = "hunter2",
useTokenAuth = useTokenAuth,
),
onNameChange = {},
onAddressChange = {},
@@ -239,7 +252,7 @@ class AppScreenshotTest {
}
}
awaitText("Add server")
composeRule.onRoot().captureRoboImage("src/test/screenshots/add_source.png")
composeRule.onRoot().captureRoboImage(file)
}
@Test