From 604271c79f13829b52ca16cc4f340b72883ece13 Mon Sep 17 00:00:00 2001 From: takahirom Date: Mon, 22 Jul 2024 21:11:14 +0900 Subject: [PATCH 1/4] Fix package name to 2024 --- app-android/build.gradle.kts | 2 +- app-android/google-services.json | 8 ++++---- app-android/src/dev/google-services.json | 8 ++++---- app-android/src/main/AndroidManifest.xml | 2 +- .../src/main/java/io/github/droidkaigi/confsched/App.kt | 2 +- .../main/java/io/github/droidkaigi/confsched/AppModule.kt | 2 +- .../droidkaigi/confsched/data/user/DataStoreModule.kt | 6 +++--- .../io/github/droidkaigi/confsched/data/DataModule.kt | 6 +++--- .../confsched/testing/data/TestDataStoreModule.kt | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app-android/build.gradle.kts b/app-android/build.gradle.kts index c39d6506a..52ed01530 100644 --- a/app-android/build.gradle.kts +++ b/app-android/build.gradle.kts @@ -19,7 +19,7 @@ val keystoreExits = keystorePropertiesFile.exists() android { // For firebase we are using 2023 now - namespace = "io.github.droidkaigi.confsched2023" + namespace = "io.github.droidkaigi.confsched2024" flavorDimensions += "network" buildFeatures { diff --git a/app-android/google-services.json b/app-android/google-services.json index b98caf6ee..be6a64d78 100644 --- a/app-android/google-services.json +++ b/app-android/google-services.json @@ -8,9 +8,9 @@ "client": [ { "client_info": { - "mobilesdk_app_id": "1:1046519477136:android:4c7faf114baa88b8a8f915", + "mobilesdk_app_id": "1:1046519477136:android:08032060aa18822ba8f915", "android_client_info": { - "package_name": "io.github.droidkaigi.confsched2023" + "package_name": "io.github.droidkaigi.confsched2024" } }, "oauth_client": [ @@ -21,7 +21,7 @@ ], "api_key": [ { - "current_key": "AIzaSyB6krIXmsPcPdnG7eZMvx1O17TC3xrE5vk" + "current_key": "AIzaSyBNLnxxd_SmTj2OspJE4GmfJbViAv_k8fs" } ], "services": { @@ -37,4 +37,4 @@ } ], "configuration_version": "1" -} \ No newline at end of file +} diff --git a/app-android/src/dev/google-services.json b/app-android/src/dev/google-services.json index d1f998069..caf0b16b4 100644 --- a/app-android/src/dev/google-services.json +++ b/app-android/src/dev/google-services.json @@ -7,9 +7,9 @@ "client": [ { "client_info": { - "mobilesdk_app_id": "1:1046519477136:android:4c7faf114baa88b8a8f915", + "mobilesdk_app_id": "1:1046519477136:android:08032060aa18822ba8f915", "android_client_info": { - "package_name": "io.github.droidkaigi.confsched2023.dev" + "package_name": "io.github.droidkaigi.confsched2024.dev" } }, "oauth_client": [ @@ -20,7 +20,7 @@ ], "api_key": [ { - "current_key": "AIzaSyB6krIXmsPcPdnG7eZMvx1O17TC3xrE5vk" + "current_key": "AIzaSyBNLnxxd_SmTj2OspJE4GmfJbViAv_k8fs" } ], "services": { @@ -36,4 +36,4 @@ } ], "configuration_version": "1" -} \ No newline at end of file +} diff --git a/app-android/src/main/AndroidManifest.xml b/app-android/src/main/AndroidManifest.xml index 19b3d0205..7a6678051 100644 --- a/app-android/src/main/AndroidManifest.xml +++ b/app-android/src/main/AndroidManifest.xml @@ -45,7 +45,7 @@ - + diff --git a/app-android/src/main/java/io/github/droidkaigi/confsched/App.kt b/app-android/src/main/java/io/github/droidkaigi/confsched/App.kt index cef0bd5c3..6aacd48bd 100644 --- a/app-android/src/main/java/io/github/droidkaigi/confsched/App.kt +++ b/app-android/src/main/java/io/github/droidkaigi/confsched/App.kt @@ -3,7 +3,7 @@ package io.github.droidkaigi.confsched import android.app.Application import dagger.hilt.android.HiltAndroidApp import io.github.droidkaigi.confsched.data.di.ServerEnvironmentModule -import io.github.droidkaigi.confsched2023.BuildConfig +import io.github.droidkaigi.confsched2024.BuildConfig @HiltAndroidApp class App : Application(), ServerEnvironmentModule.HasServerEnvironment { diff --git a/app-android/src/main/java/io/github/droidkaigi/confsched/AppModule.kt b/app-android/src/main/java/io/github/droidkaigi/confsched/AppModule.kt index 611d305ca..4ca7760bf 100644 --- a/app-android/src/main/java/io/github/droidkaigi/confsched/AppModule.kt +++ b/app-android/src/main/java/io/github/droidkaigi/confsched/AppModule.kt @@ -6,7 +6,7 @@ import dagger.hilt.InstallIn import dagger.hilt.components.SingletonComponent import io.github.droidkaigi.confsched.data.di.AppAndroidBuildConfig import io.github.droidkaigi.confsched.model.BuildConfigProvider -import io.github.droidkaigi.confsched2023.BuildConfig +import io.github.droidkaigi.confsched2024.BuildConfig import kotlinx.datetime.Clock import javax.inject.Singleton diff --git a/core/data/src/androidMain/kotlin/io/github/droidkaigi/confsched/data/user/DataStoreModule.kt b/core/data/src/androidMain/kotlin/io/github/droidkaigi/confsched/data/user/DataStoreModule.kt index 625be3e60..a68ee6678 100644 --- a/core/data/src/androidMain/kotlin/io/github/droidkaigi/confsched/data/user/DataStoreModule.kt +++ b/core/data/src/androidMain/kotlin/io/github/droidkaigi/confsched/data/user/DataStoreModule.kt @@ -59,10 +59,10 @@ public class DataStoreModule { ) public companion object { - private const val DATA_STORE_PREFERENCE_FILE_NAME = "confsched2023.preferences_pb" + private const val DATA_STORE_PREFERENCE_FILE_NAME = "confsched2024.preferences_pb" private const val DATA_STORE_CACHE_PREFERENCE_FILE_NAME = - "confsched2023.cache.preferences_pb" + "confsched2024.cache.preferences_pb" private const val DATA_STORE_ACHIEVEMENTS_FILE_NAME = - "confsched2023.achievements.preferences_pb" + "confsched2024.achievements.preferences_pb" } } diff --git a/core/data/src/iosMain/kotlin/io/github/droidkaigi/confsched/data/DataModule.kt b/core/data/src/iosMain/kotlin/io/github/droidkaigi/confsched/data/DataModule.kt index 9940de755..fa410033d 100644 --- a/core/data/src/iosMain/kotlin/io/github/droidkaigi/confsched/data/DataModule.kt +++ b/core/data/src/iosMain/kotlin/io/github/droidkaigi/confsched/data/DataModule.kt @@ -93,7 +93,7 @@ public val dataModule: Module = module { create = false, error = null, ) - requireNotNull(documentDirectory).path + "/confsched2023.preferences_pb" + requireNotNull(documentDirectory).path + "/confsched2024.preferences_pb" }, ) UserDataStore(dataStore) @@ -109,7 +109,7 @@ public val dataModule: Module = module { create = false, error = null, ) - requireNotNull(documentDirectory).path + "/confsched2023.cache.preferences_pb" + requireNotNull(documentDirectory).path + "/confsched2024.cache.preferences_pb" }, ) SessionCacheDataStore(dataStore, get()) @@ -125,7 +125,7 @@ public val dataModule: Module = module { create = false, error = null, ) - requireNotNull(documentDirectory).path + "/confsched2023.achievements.preferences_pb" + requireNotNull(documentDirectory).path + "/confsched2024.achievements.preferences_pb" }, ) AchievementsDataStore(dataStore) diff --git a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/data/TestDataStoreModule.kt b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/data/TestDataStoreModule.kt index af87faa8a..cfa539bd1 100644 --- a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/data/TestDataStoreModule.kt +++ b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/data/TestDataStoreModule.kt @@ -65,6 +65,6 @@ class TestDataStoreModule { private const val TEST_DATASTORE_NAME = "test_datastore.preferences_pb" private const val TEST_DATASTORE_CACHE_NAME = "test_datastore_cache.preferences_pb" private const val TEST_DATASTORE_ACHIEVEMENTS_NAME = - "confsched2023.achievements.preferences_pb" + "confsched2024.achievements.preferences_pb" } } From e8bf943d2277056415fb410e10dc975f90f9ea57 Mon Sep 17 00:00:00 2001 From: takahirom Date: Mon, 22 Jul 2024 21:55:01 +0900 Subject: [PATCH 2/4] Refactor about screen --- .../testing/robot/AboutScreenRobot.kt | 16 +++---- .../confsched/about/AboutScreenTest.kt | 2 +- .../droidkaigi/confsched/about/AboutScreen.kt | 47 ++++++++++--------- .../{component => section}/AboutCredits.kt | 20 ++++---- .../AboutDroidKaigiDetail.kt | 5 +- .../AboutFooterLinks.kt | 3 +- .../{component => section}/AboutOthers.kt | 20 ++++---- 7 files changed, 63 insertions(+), 50 deletions(-) rename feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/{component => section}/AboutCredits.kt (75%) rename feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/{component => section}/AboutDroidKaigiDetail.kt (91%) rename feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/{component => section}/AboutFooterLinks.kt (96%) rename feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/{component => section}/AboutOthers.kt (79%) diff --git a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt index a4fe765c3..72c7572c9 100644 --- a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt +++ b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt @@ -23,27 +23,27 @@ class AboutScreenRobot @Inject constructor( waitUntilIdle() } - fun checkDetailScreenDisplayed() { + fun checkDetailSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.DetailScreen.SCREEN)) + .onNode(hasTestTag(AboutTestTag.DetailSection.Name)) .assertIsDisplayed() } - fun checkCreditsScreenDisplayed() { + fun checkCreditsSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.CreditsScreen.SCREEN)) + .onNode(hasTestTag(AboutTestTag.CreditsSection.Name)) .assertIsDisplayed() } - fun checkOthersScreenDisplayed() { + fun checkOthersSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.OthersScreen.SCREEN)) + .onNode(hasTestTag(AboutTestTag.OthersSection.Name)) .assertIsDisplayed() } - fun checkFooterLinksScreenDisplayed() { + fun checkFooterLinksSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.FooterLinksScreen.SCREEN)) + .onNode(hasTestTag(AboutTestTag.FooterLinksSection.Name)) .assertIsDisplayed() } } diff --git a/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt b/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt index 6cb0f7e40..cf24843d4 100644 --- a/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt +++ b/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt @@ -45,7 +45,7 @@ class AboutScreenTest( setupScreenContent() } } - itShould("show detail screen") { + itShould("show scr") { captureScreenWithChecks { checkDetailScreenDisplayed() } diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt index 5138de62b..e2b694210 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt @@ -18,11 +18,14 @@ import androidx.navigation.NavController import androidx.navigation.NavGraph.Companion.findStartDestination import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable -import io.github.droidkaigi.confsched.about.component.AboutDroidKaigiDetail -import io.github.droidkaigi.confsched.about.component.AboutFooterLinks -import io.github.droidkaigi.confsched.about.component.aboutCredits -import io.github.droidkaigi.confsched.about.component.aboutOthers +import io.github.droidkaigi.confsched.about.section.AboutDroidKaigiDetail +import io.github.droidkaigi.confsched.about.section.AboutFooterLinks +import io.github.droidkaigi.confsched.about.section.aboutCredits +import io.github.droidkaigi.confsched.about.section.aboutOthers import io.github.droidkaigi.confsched.model.AboutItem +import io.github.droidkaigi.confsched.model.AboutItem.Medium +import io.github.droidkaigi.confsched.model.AboutItem.X +import io.github.droidkaigi.confsched.model.AboutItem.YouTube const val aboutScreenRoute = "about" @@ -30,24 +33,24 @@ object AboutTestTag { private const val suffix = "TestTag" private const val prefix = "ProfileCard" - object DetailScreen { - private const val detailScreenPrefix = "${prefix}_DetailScreen" - const val SCREEN = "${detailScreenPrefix}_$suffix" + object DetailSection { + private const val detailSectionPrefix = "${prefix}_DetailSection" + const val Name = "${detailSectionPrefix}_$suffix" } - object CreditsScreen { - private const val creditsScreenPrefix = "${prefix}_CreditsScreen" - const val SCREEN = "${creditsScreenPrefix}_$suffix" + object CreditsSection { + private const val creditsSectionPrefix = "${prefix}_CreditsSection" + const val Name = "${creditsSectionPrefix}_$suffix" } - object OthersScreen { - private const val othersScreenPrefix = "${prefix}_OthersScreen" - const val SCREEN = "${othersScreenPrefix}_$suffix" + object OthersSection { + private const val othersSectionPrefix = "${prefix}_OthersSection" + const val Name = "${othersSectionPrefix}_$suffix" } - object FooterLinksScreen { - private const val footerLinksScreenPrefix = "${prefix}_FooterLinksScreen" - const val SCREEN = "${footerLinksScreenPrefix}_$suffix" + object FooterLinksSection { + private const val footerLinksSectionPrefix = "${prefix}_FooterLinksSection" + const val Name = "${footerLinksSectionPrefix}_$suffix" } } @@ -111,7 +114,7 @@ fun AboutScreen( onStaffItemClick = { onAboutItemClick(AboutItem.Staff) }, - modifier = Modifier.testTag(AboutTestTag.CreditsScreen.SCREEN), + modifier = Modifier.testTag(AboutTestTag.CreditsSction.Name), ) aboutOthers( onCodeOfConductItemClick = { @@ -123,22 +126,22 @@ fun AboutScreen( onPrivacyPolicyItemClick = { onAboutItemClick(AboutItem.PrivacyPolicy) }, - modifier = Modifier.testTag(AboutTestTag.OthersScreen.SCREEN), + modifier = Modifier.testTag(AboutTestTag.OthersSction.Name), ) item { AboutFooterLinks( // TODO: Inject the right version name versionName = "1.6.0", onYouTubeClick = { - onAboutItemClick(AboutItem.YouTube) + onAboutItemClick(YouTube) }, onXClick = { - onAboutItemClick(AboutItem.X) + onAboutItemClick(X) }, onMediumClick = { - onAboutItemClick(AboutItem.Medium) + onAboutItemClick(Medium) }, - modifier = Modifier.testTag(AboutTestTag.FooterLinksScreen.SCREEN), + modifier = Modifier.testTag(AboutTestTag.FooterLinksSction.Name), ) } } diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutCredits.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutCredits.kt similarity index 75% rename from feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutCredits.kt rename to feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutCredits.kt index 50fb66b11..32db5d3f5 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutCredits.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutCredits.kt @@ -1,8 +1,8 @@ -package io.github.droidkaigi.confsched.about.component +package io.github.droidkaigi.confsched.about.section import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyListScope -import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.Icons.Outlined import androidx.compose.material.icons.outlined.Apartment import androidx.compose.material.icons.outlined.Diversity1 import androidx.compose.material.icons.outlined.SentimentVerySatisfied @@ -10,7 +10,11 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp +import io.github.droidkaigi.confsched.about.component.AboutContentColumn import io.github.droidkaigi.confsched.about.strings.AboutStrings +import io.github.droidkaigi.confsched.about.strings.AboutStrings.Contributor +import io.github.droidkaigi.confsched.about.strings.AboutStrings.Sponsor +import io.github.droidkaigi.confsched.about.strings.AboutStrings.Staff const val AboutCreditsStaffItemTestTag = "AboutCreditsStaffItem" const val AboutCreditsContributorsItemTestTag = "AboutCreditsContributorsItem" @@ -36,8 +40,8 @@ fun LazyListScope.aboutCredits( } item { AboutContentColumn( - leadingIcon = Icons.Outlined.Diversity1, - label = AboutStrings.Contributor.asString(), + leadingIcon = Outlined.Diversity1, + label = Contributor.asString(), testTag = AboutCreditsContributorsItemTestTag, onClickAction = onContributorsItemClick, modifier = modifier @@ -48,8 +52,8 @@ fun LazyListScope.aboutCredits( } item { AboutContentColumn( - leadingIcon = Icons.Outlined.SentimentVerySatisfied, - label = AboutStrings.Staff.asString(), + leadingIcon = Outlined.SentimentVerySatisfied, + label = Staff.asString(), testTag = AboutCreditsStaffItemTestTag, onClickAction = onStaffItemClick, modifier = modifier @@ -60,8 +64,8 @@ fun LazyListScope.aboutCredits( } item { AboutContentColumn( - leadingIcon = Icons.Outlined.Apartment, - label = AboutStrings.Sponsor.asString(), + leadingIcon = Outlined.Apartment, + label = Sponsor.asString(), testTag = AboutCreditsSponsorsItemTestTag, onClickAction = onSponsorsItemClick, modifier = modifier diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutDroidKaigiDetail.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutDroidKaigiDetail.kt similarity index 91% rename from feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutDroidKaigiDetail.kt rename to feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutDroidKaigiDetail.kt index 2e8c855bd..34f072318 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutDroidKaigiDetail.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutDroidKaigiDetail.kt @@ -1,4 +1,4 @@ -package io.github.droidkaigi.confsched.about.component +package io.github.droidkaigi.confsched.about.section import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Column @@ -16,6 +16,7 @@ import androidx.compose.ui.unit.dp import conference_app_2024.feature.about.generated.resources.Res import conference_app_2024.feature.about.generated.resources.about_header import io.github.droidkaigi.confsched.about.AboutTestTag +import io.github.droidkaigi.confsched.about.component.AboutDroidKaigiDetailSummaryCard import io.github.droidkaigi.confsched.about.strings.AboutStrings import io.github.droidkaigi.confsched.designsystem.theme.KaigiTheme import org.jetbrains.compose.resources.painterResource @@ -26,7 +27,7 @@ fun AboutDroidKaigiDetail( modifier: Modifier = Modifier, ) { Column( - modifier = modifier.testTag(AboutTestTag.DetailScreen.SCREEN), + modifier = modifier.testTag(AboutTestTag.DetailSection.Name), ) { Image( painter = painterResource(Res.drawable.about_header), diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutFooterLinks.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutFooterLinks.kt similarity index 96% rename from feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutFooterLinks.kt rename to feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutFooterLinks.kt index 3b66b1135..90f0332dd 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutFooterLinks.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutFooterLinks.kt @@ -1,4 +1,4 @@ -package io.github.droidkaigi.confsched.about.component +package io.github.droidkaigi.confsched.about.section import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Arrangement @@ -17,6 +17,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import io.github.droidkaigi.confsched.about.component.AboutFooterLinksIcon import io.github.droidkaigi.confsched.about.strings.AboutStrings import io.github.droidkaigi.confsched.designsystem.theme.KaigiTheme import org.jetbrains.compose.ui.tooling.preview.Preview diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutOthers.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutOthers.kt similarity index 79% rename from feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutOthers.kt rename to feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutOthers.kt index f67de28fb..156ca8c21 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/component/AboutOthers.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutOthers.kt @@ -1,9 +1,9 @@ -package io.github.droidkaigi.confsched.about.component +package io.github.droidkaigi.confsched.about.section import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyListScope -import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.Icons.Outlined import androidx.compose.material.icons.outlined.FileCopy import androidx.compose.material.icons.outlined.Gavel import androidx.compose.material.icons.outlined.PrivacyTip @@ -13,7 +13,11 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp +import io.github.droidkaigi.confsched.about.component.AboutContentColumn import io.github.droidkaigi.confsched.about.strings.AboutStrings +import io.github.droidkaigi.confsched.about.strings.AboutStrings.CodeOfConduct +import io.github.droidkaigi.confsched.about.strings.AboutStrings.License +import io.github.droidkaigi.confsched.about.strings.AboutStrings.PrivacyPolicy import io.github.droidkaigi.confsched.designsystem.theme.KaigiTheme import org.jetbrains.compose.ui.tooling.preview.Preview @@ -41,8 +45,8 @@ fun LazyListScope.aboutOthers( } item { AboutContentColumn( - leadingIcon = Icons.Outlined.Gavel, - label = AboutStrings.CodeOfConduct.asString(), + leadingIcon = Outlined.Gavel, + label = CodeOfConduct.asString(), testTag = AboutOthersCodeOfConductItemTestTag, onClickAction = onCodeOfConductItemClick, modifier = modifier @@ -53,8 +57,8 @@ fun LazyListScope.aboutOthers( } item { AboutContentColumn( - leadingIcon = Icons.Outlined.FileCopy, - label = AboutStrings.License.asString(), + leadingIcon = Outlined.FileCopy, + label = License.asString(), testTag = AboutOthersLicenseItemTestTag, onClickAction = onLicenseItemClick, modifier = modifier @@ -65,8 +69,8 @@ fun LazyListScope.aboutOthers( } item { AboutContentColumn( - leadingIcon = Icons.Outlined.PrivacyTip, - label = AboutStrings.PrivacyPolicy.asString(), + leadingIcon = Outlined.PrivacyTip, + label = PrivacyPolicy.asString(), testTag = AboutOthersPrivacyPolicyItemTestTag, onClickAction = onPrivacyPolicyItemClick, modifier = modifier From e67a91a637b29efbab970badbf09193be3ecbe99 Mon Sep 17 00:00:00 2001 From: takahirom Date: Mon, 22 Jul 2024 22:25:59 +0900 Subject: [PATCH 3/4] Fix typo --- .../io/github/droidkaigi/confsched/about/AboutScreen.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt index e2b694210..f94f02041 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt @@ -114,7 +114,7 @@ fun AboutScreen( onStaffItemClick = { onAboutItemClick(AboutItem.Staff) }, - modifier = Modifier.testTag(AboutTestTag.CreditsSction.Name), + modifier = Modifier.testTag(AboutTestTag.CreditsSection.Name), ) aboutOthers( onCodeOfConductItemClick = { @@ -126,7 +126,7 @@ fun AboutScreen( onPrivacyPolicyItemClick = { onAboutItemClick(AboutItem.PrivacyPolicy) }, - modifier = Modifier.testTag(AboutTestTag.OthersSction.Name), + modifier = Modifier.testTag(AboutTestTag.OthersSection.Name), ) item { AboutFooterLinks( @@ -141,7 +141,7 @@ fun AboutScreen( onMediumClick = { onAboutItemClick(Medium) }, - modifier = Modifier.testTag(AboutTestTag.FooterLinksSction.Name), + modifier = Modifier.testTag(AboutTestTag.FooterLinksSection.Name), ) } } From 055e7d4d7fd2e529cc2a9ce6788cc1f941d35732 Mon Sep 17 00:00:00 2001 From: takahirom Date: Mon, 22 Jul 2024 22:32:49 +0900 Subject: [PATCH 4/4] Rename --- .../confsched/testing/robot/AboutScreenRobot.kt | 8 ++++---- .../droidkaigi/confsched/about/AboutScreenTest.kt | 2 +- .../droidkaigi/confsched/about/AboutScreen.kt | 14 +++++++------- .../about/section/AboutDroidKaigiDetail.kt | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt index 72c7572c9..8e1613a4b 100644 --- a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt +++ b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/robot/AboutScreenRobot.kt @@ -25,25 +25,25 @@ class AboutScreenRobot @Inject constructor( fun checkDetailSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.DetailSection.Name)) + .onNode(hasTestTag(AboutTestTag.DetailSection.Section)) .assertIsDisplayed() } fun checkCreditsSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.CreditsSection.Name)) + .onNode(hasTestTag(AboutTestTag.CreditsSection.Section)) .assertIsDisplayed() } fun checkOthersSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.OthersSection.Name)) + .onNode(hasTestTag(AboutTestTag.OthersSection.Section)) .assertIsDisplayed() } fun checkFooterLinksSectionDisplayed() { composeTestRule - .onNode(hasTestTag(AboutTestTag.FooterLinksSection.Name)) + .onNode(hasTestTag(AboutTestTag.FooterLinksSection.Section)) .assertIsDisplayed() } } diff --git a/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt b/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt index cf24843d4..5840f7b7b 100644 --- a/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt +++ b/feature/about/src/androidUnitTest/kotlin/io/github/droidkaigi/confsched/about/AboutScreenTest.kt @@ -47,7 +47,7 @@ class AboutScreenTest( } itShould("show scr") { captureScreenWithChecks { - checkDetailScreenDisplayed() + checkDetailSectionDisplayed() } } } diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt index f94f02041..f7316308e 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutScreen.kt @@ -35,22 +35,22 @@ object AboutTestTag { object DetailSection { private const val detailSectionPrefix = "${prefix}_DetailSection" - const val Name = "${detailSectionPrefix}_$suffix" + const val Section = "${detailSectionPrefix}_$suffix" } object CreditsSection { private const val creditsSectionPrefix = "${prefix}_CreditsSection" - const val Name = "${creditsSectionPrefix}_$suffix" + const val Section = "${creditsSectionPrefix}_$suffix" } object OthersSection { private const val othersSectionPrefix = "${prefix}_OthersSection" - const val Name = "${othersSectionPrefix}_$suffix" + const val Section = "${othersSectionPrefix}_$suffix" } object FooterLinksSection { private const val footerLinksSectionPrefix = "${prefix}_FooterLinksSection" - const val Name = "${footerLinksSectionPrefix}_$suffix" + const val Section = "${footerLinksSectionPrefix}_$suffix" } } @@ -114,7 +114,7 @@ fun AboutScreen( onStaffItemClick = { onAboutItemClick(AboutItem.Staff) }, - modifier = Modifier.testTag(AboutTestTag.CreditsSection.Name), + modifier = Modifier.testTag(AboutTestTag.CreditsSection.Section), ) aboutOthers( onCodeOfConductItemClick = { @@ -126,7 +126,7 @@ fun AboutScreen( onPrivacyPolicyItemClick = { onAboutItemClick(AboutItem.PrivacyPolicy) }, - modifier = Modifier.testTag(AboutTestTag.OthersSection.Name), + modifier = Modifier.testTag(AboutTestTag.OthersSection.Section), ) item { AboutFooterLinks( @@ -141,7 +141,7 @@ fun AboutScreen( onMediumClick = { onAboutItemClick(Medium) }, - modifier = Modifier.testTag(AboutTestTag.FooterLinksSection.Name), + modifier = Modifier.testTag(AboutTestTag.FooterLinksSection.Section), ) } } diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutDroidKaigiDetail.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutDroidKaigiDetail.kt index 34f072318..4348c6bca 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutDroidKaigiDetail.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/section/AboutDroidKaigiDetail.kt @@ -27,7 +27,7 @@ fun AboutDroidKaigiDetail( modifier: Modifier = Modifier, ) { Column( - modifier = modifier.testTag(AboutTestTag.DetailSection.Name), + modifier = modifier.testTag(AboutTestTag.DetailSection.Section), ) { Image( painter = painterResource(Res.drawable.about_header),