Skip to content

Commit 8c98900

Browse files
committed
maestro updates
1 parent b242164 commit 8c98900

File tree

5 files changed

+19
-14
lines changed

5 files changed

+19
-14
lines changed

PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@
514514
"-framework",
515515
common,
516516
);
517-
PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.PeopleInSpaceSwiftUI;
517+
PRODUCT_BUNDLE_IDENTIFIER = dev.johnoreilly.peopleinspace;
518518
PRODUCT_NAME = "$(TARGET_NAME)";
519519
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
520520
SUPPORTS_MACCATALYST = NO;
@@ -549,7 +549,7 @@
549549
"-framework",
550550
common,
551551
);
552-
PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.PeopleInSpaceSwiftUI;
552+
PRODUCT_BUNDLE_IDENTIFIER = dev.johnoreilly.peopleinspace;
553553
PRODUCT_NAME = "$(TARGET_NAME)";
554554
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
555555
SUPPORTS_MACCATALYST = NO;

PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI/Info.plist

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>CADisableMinimumFrameDurationOnPhone</key><true/>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
67
<key>CFBundleDevelopmentRegion</key>
78
<string>$(DEVELOPMENT_LANGUAGE)</string>
89
<key>CFBundleExecutable</key>
@@ -26,6 +27,8 @@
2627
<key>UIApplicationSupportsMultipleScenes</key>
2728
<false/>
2829
</dict>
30+
<key>UILaunchScreen</key>
31+
<dict/>
2932
<key>UIRequiredDeviceCapabilities</key>
3033
<array>
3134
<string>armv7</string>
@@ -43,7 +46,5 @@
4346
<string>UIInterfaceOrientationLandscapeLeft</string>
4447
<string>UIInterfaceOrientationLandscapeRight</string>
4548
</array>
46-
<key>UILaunchScreen</key>
47-
<dict/>
4849
</dict>
4950
</plist>

app/src/main/java/com/surrus/peopleinspace/personlist/PersonListScreen.kt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import androidx.compose.foundation.background
88
import androidx.compose.foundation.clickable
99
import androidx.compose.foundation.layout.*
1010
import androidx.compose.foundation.lazy.LazyColumn
11-
import androidx.compose.foundation.lazy.items
11+
import androidx.compose.foundation.lazy.itemsIndexed
1212
import androidx.compose.foundation.shape.CircleShape
1313
import androidx.compose.material.ExperimentalMaterialApi
1414
import androidx.compose.material.icons.Icons
@@ -41,6 +41,7 @@ import androidx.compose.ui.platform.testTag
4141
import androidx.compose.ui.res.stringResource
4242
import androidx.compose.ui.semantics.contentDescription
4343
import androidx.compose.ui.semantics.semantics
44+
import androidx.compose.ui.semantics.testTagsAsResourceId
4445
import androidx.compose.ui.tooling.preview.Preview
4546
import androidx.compose.ui.tooling.preview.PreviewParameter
4647
import androidx.compose.ui.unit.dp
@@ -59,8 +60,7 @@ const val PersonListTag = "PersonList"
5960

6061

6162
@Composable
62-
fun PersonListRoute(
63-
navigateToPerson: (Assignment) -> Unit, ) {
63+
fun PersonListRoute(navigateToPerson: (Assignment) -> Unit, ) {
6464
val viewModel: PersonListViewModel = koinViewModel()
6565
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
6666

@@ -184,8 +184,8 @@ fun PersonListScreen(
184184
.fillMaxSize()
185185
) {
186186
if (!refreshing) {
187-
items(uiState.result) { person ->
188-
PersonView(person, navigateToPerson)
187+
itemsIndexed(uiState.result) { index, person ->
188+
PersonView(index, person, navigateToPerson)
189189
}
190190
}
191191
}
@@ -199,7 +199,7 @@ fun PersonListScreen(
199199
}
200200

201201
@Composable
202-
fun PersonView(person: Assignment, personSelected: (person: Assignment) -> Unit) {
202+
fun PersonView(index: Int, person: Assignment, personSelected: (person: Assignment) -> Unit) {
203203
Card(
204204
modifier = Modifier
205205
.fillMaxWidth()
@@ -246,7 +246,9 @@ fun PersonView(person: Assignment, personSelected: (person: Assignment) -> Unit)
246246
Text(
247247
text = person.name,
248248
style = MaterialTheme.typography.titleMedium,
249-
color = MaterialTheme.colorScheme.onSurface
249+
color = MaterialTheme.colorScheme.onSurface,
250+
modifier = Modifier.testTag("person$index")
251+
.semantics { testTagsAsResourceId = true}
250252
)
251253
Spacer(modifier = Modifier.height(4.dp))
252254
Text(
@@ -263,6 +265,6 @@ fun PersonView(person: Assignment, personSelected: (person: Assignment) -> Unit)
263265
@Composable
264266
fun PersonViewPreview(@PreviewParameter(PersonProvider::class) person: Assignment) {
265267
MaterialTheme {
266-
PersonView(person, personSelected = {})
268+
PersonView(0, person, personSelected = {})
267269
}
268270
}

common/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
alias(libs.plugins.jetbrainsCompose)
1313
alias(libs.plugins.compose.compiler)
1414
alias(libs.plugins.skie)
15-
id("io.github.luca992.multiplatform-swiftpackage") version "2.2.4"
15+
id("io.github.luca992.multiplatform-swiftpackage") version "2.3.0"
1616
}
1717

1818
android {

maestro/PeopleInSpace.flow

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ appId: dev.johnoreilly.peopleinspace
1010

1111
- tapOn: "People"
1212
- assertVisible: "People in Space"
13+
- assertVisible:
14+
id: "person0"
1315

1416
- takeScreenshot: PeopleInSpace

0 commit comments

Comments
 (0)