mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
match the remaining app bar titles and cover the switch off state
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user