[SHARED] Update libs
This commit is contained in:
@@ -15,9 +15,23 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.pages
|
||||
|
||||
import androidx.compose.ui.test.assertIsDisplayed
|
||||
import androidx.compose.ui.test.junit4.ComposeContentTestRule
|
||||
import androidx.compose.ui.test.onNodeWithTag
|
||||
import androidx.compose.ui.test.onNodeWithText
|
||||
import com.kgurgul.cpuinfo.shared.Res
|
||||
import com.kgurgul.cpuinfo.shared.cpu
|
||||
import com.kgurgul.cpuinfo.ui.components.TEST_TAG_CPU_TOP_APP_BAR
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.jetbrains.compose.resources.getString
|
||||
|
||||
class InfoContainerPage(private val composeContent: ComposeContentTestRule) {
|
||||
class InfoContainerPage(composeContent: ComposeContentTestRule) {
|
||||
|
||||
fun assertViewDisplayed() {}
|
||||
private val toolbarTitle = composeContent.onNodeWithTag(TEST_TAG_CPU_TOP_APP_BAR)
|
||||
private val cpuTab = composeContent.onNodeWithText(runBlocking { getString(Res.string.cpu) })
|
||||
|
||||
fun assertViewDisplayed() {
|
||||
toolbarTitle.assertIsDisplayed()
|
||||
cpuTab.assertIsDisplayed()
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -26,5 +26,8 @@ class InfoTestSuit : BaseTestSuit() {
|
||||
|
||||
private val infoContainerPage = InfoContainerPage(androidComposeRule)
|
||||
|
||||
@Test fun checkInfoTabs() {}
|
||||
@Test
|
||||
fun checkInitialScreenDisplayed() {
|
||||
infoContainerPage.assertViewDisplayed()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ plugins {
|
||||
alias(libs.plugins.dependencyUpdate)
|
||||
alias(libs.plugins.kotlin.multiplatform) apply false
|
||||
alias(libs.plugins.kover)
|
||||
alias(libs.plugins.ksp) apply false
|
||||
alias(libs.plugins.androidTest) apply false
|
||||
alias(libs.plugins.baselineprofile) apply false
|
||||
alias(libs.plugins.compose.compiler) apply false
|
||||
|
||||
@@ -23,7 +23,7 @@ composeLifecycle = "2.9.6"
|
||||
composeMultiplatform = "1.10.1"
|
||||
composeMaterial3 = "1.9.0"
|
||||
composeNavigation = "2.9.2"
|
||||
composeUiTest = "1.10.3"
|
||||
composeUiTest = "1.10.4"
|
||||
dependencyUpdate = "0.53.0"
|
||||
horologist = "0.7.15"
|
||||
imageio = "3.13.1"
|
||||
@@ -37,7 +37,6 @@ kotlinxImmutable = "0.4.0"
|
||||
kotlinxSerialization = "1.10.0"
|
||||
kover = "0.9.7"
|
||||
ktfmt = "0.61"
|
||||
ksp = "2.3.6"
|
||||
licenses = "3.1.1"
|
||||
oshi = "6.10.0"
|
||||
profileinstaller = "1.4.1"
|
||||
@@ -115,7 +114,6 @@ compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "composeMu
|
||||
dependencyUpdate = { id = "com.github.ben-manes.versions", version.ref = "dependencyUpdate" }
|
||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
licenses = { id = "com.github.jk1.dependency-license-report", version.ref = "licenses" }
|
||||
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
|
||||
|
||||
@@ -7,7 +7,6 @@ plugins {
|
||||
alias(libs.plugins.android.kotlin.multiplatform.library)
|
||||
alias(libs.plugins.compose.multiplatform)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.kover)
|
||||
alias(libs.plugins.licenses)
|
||||
alias(libs.plugins.serialization)
|
||||
|
||||
@@ -31,6 +31,7 @@ import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.material3.TopAppBarScrollBehavior
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.kgurgul.cpuinfo.ui.theme.CpuInfoTheme
|
||||
@@ -149,10 +150,12 @@ private fun CpuTopAppBar(
|
||||
colors = colors,
|
||||
windowInsets = windowInsets,
|
||||
scrollBehavior = scrollBehavior,
|
||||
modifier = modifier,
|
||||
modifier = modifier.testTag(TEST_TAG_CPU_TOP_APP_BAR),
|
||||
)
|
||||
}
|
||||
|
||||
const val TEST_TAG_CPU_TOP_APP_BAR = "CpuTopAppBar"
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun TopAppBarPreview() {
|
||||
|
||||
Reference in New Issue
Block a user