mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-15 00:42:54 +01:00
settings: name the setting ReplayGain and rework the preamp dialog
- Call it ReplayGain, which is the name of the standard, in the row, the prompt and the preamp prompt. - Give the slider room under the prompt instead of sitting against it. - Put Reset in the button row, where it lines up with Cancel and Done, rather than above them, and centre the decibel value that is left in the content. - Add a screenshot test that scrolls to the section and opens the dialog, which also composes the new rows; the existing screenshot only captures the top of the list, so it never rendered them.
This commit is contained in:
@@ -12,11 +12,15 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.test.assertCountEquals
|
||||
import androidx.compose.ui.test.hasScrollAction
|
||||
import androidx.compose.ui.test.hasText
|
||||
import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule
|
||||
import androidx.compose.ui.test.onAllNodesWithContentDescription
|
||||
import androidx.compose.ui.test.onAllNodesWithTag
|
||||
import androidx.compose.ui.test.onAllNodesWithText
|
||||
import androidx.compose.ui.test.onRoot
|
||||
import androidx.compose.ui.test.performClick
|
||||
import androidx.compose.ui.test.performScrollToNode
|
||||
import androidx.compose.ui.test.performTouchInput
|
||||
import androidx.compose.ui.test.swipeUp
|
||||
import androidx.paging.PagingData
|
||||
@@ -340,6 +344,21 @@ class AppScreenshotTest {
|
||||
|
||||
@Test
|
||||
fun settings() {
|
||||
setSettingsContent()
|
||||
awaitText("Navidrome")
|
||||
composeRule.onRoot().captureRoboImage("src/test/screenshots/settings.png")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun replayGainPreampDialog() {
|
||||
setSettingsContent()
|
||||
composeRule.onNode(hasScrollAction()).performScrollToNode(hasText("Preamp"))
|
||||
composeRule.onAllNodesWithText("Preamp")[0].performClick()
|
||||
composeRule.waitForIdle()
|
||||
composeRule.onRoot().captureRoboImage("src/test/screenshots/replay_gain_preamp.png")
|
||||
}
|
||||
|
||||
private fun setSettingsContent() {
|
||||
composeRule.setContent {
|
||||
SubtracksTheme {
|
||||
SettingsScreen(
|
||||
@@ -367,8 +386,6 @@ class AppScreenshotTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
awaitText("Navidrome")
|
||||
composeRule.onRoot().captureRoboImage("src/test/screenshots/settings.png")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user