mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +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,
|
modifier = modifier,
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text("Queue") },
|
title = { Text("Queue", style = MaterialTheme.typography.headlineMedium) },
|
||||||
navigationIcon = {
|
navigationIcon = {
|
||||||
IconButton(onClick = onBack) {
|
IconButton(onClick = onBack) {
|
||||||
Icon(Icons.AutoMirrored.Rounded.ArrowBack, contentDescription = "Back")
|
Icon(Icons.AutoMirrored.Rounded.ArrowBack, contentDescription = "Back")
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ fun AddSourceScreen(
|
|||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text("Add server") },
|
title = { Text("Add server", style = MaterialTheme.typography.headlineMedium) },
|
||||||
navigationIcon = {
|
navigationIcon = {
|
||||||
if (onBack != null) {
|
if (onBack != null) {
|
||||||
IconButton(onClick = onBack) {
|
IconButton(onClick = onBack) {
|
||||||
|
|||||||
@@ -217,6 +217,18 @@ class AppScreenshotTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun addSource() {
|
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 {
|
composeRule.setContent {
|
||||||
SubtracksTheme {
|
SubtracksTheme {
|
||||||
AddSourceScreen(
|
AddSourceScreen(
|
||||||
@@ -226,6 +238,7 @@ class AppScreenshotTest {
|
|||||||
address = "https://music.example.com",
|
address = "https://music.example.com",
|
||||||
username = "austin",
|
username = "austin",
|
||||||
password = "hunter2",
|
password = "hunter2",
|
||||||
|
useTokenAuth = useTokenAuth,
|
||||||
),
|
),
|
||||||
onNameChange = {},
|
onNameChange = {},
|
||||||
onAddressChange = {},
|
onAddressChange = {},
|
||||||
@@ -239,7 +252,7 @@ class AppScreenshotTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
awaitText("Add server")
|
awaitText("Add server")
|
||||||
composeRule.onRoot().captureRoboImage("src/test/screenshots/add_source.png")
|
composeRule.onRoot().captureRoboImage(file)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user