11package maestro.orchestra.workspace
22
33import com.google.common.truth.Truth.assertThat
4+ import maestro.orchestra.WorkspaceConfig
5+ import maestro.orchestra.WorkspaceConfig.*
46import org.junit.jupiter.api.Test
57import java.nio.file.Path
68import java.nio.file.Paths
@@ -339,28 +341,23 @@ internal class WorkspaceExecutionPlannerTest {
339341 }
340342
341343 @Test
342- internal fun `016 - Upload Config gets correct values` () {
343- // When
344- val planWithoutConfig = WorkspaceExecutionPlanner .plan(
345- input = paths(" /workspaces/000_individual_file" ),
346- includeTags = listOf (),
347- excludeTags = listOf (),
348- config = null
349- )
350-
351- val planWithIncludeNonModalElements = WorkspaceExecutionPlanner .plan(
352- input = paths(" /workspaces/013_execution_order" ),
353- includeTags = listOf (),
354- excludeTags = listOf (),
344+ internal fun `017 - Upload configs on local and cloud both are supported` () {
345+ // when
346+ val plan = WorkspaceExecutionPlanner .plan(
347+ input = paths(" /workspaces/015_workspace_cloud_configs" ),
348+ includeTags = listOf (" included" ),
349+ excludeTags = listOf (" notIncluded" ),
355350 config = null
356351 )
357352
358- assertThat(planWithoutConfig.workspaceConfig.iosIncludeNonModalElements).isNull()
359- assertThat(planWithIncludeNonModalElements.workspaceConfig.iosIncludeNonModalElements).isTrue()
353+ assertThat(plan.workspaceConfig.notifications?.email?.recipients).containsExactly(
" [email protected] " )
354+ assertThat(plan.workspaceConfig.notifications?.slack?.channels).containsExactly(" e2e-testing" )
355+ assertThat(plan.workspaceConfig.executionOrder?.flowsOrder).containsExactly(" flowA" , " flowB" )
356+ assertThat(plan.workspaceConfig.disableRetries).isTrue()
360357 }
361358
362359 @Test
363- internal fun `017 - Upload configs on local and cloud both are supported` () {
360+ internal fun `017 - Upload platform configs on are supported` () {
364361 // when
365362 val plan = WorkspaceExecutionPlanner .plan(
366363 input = paths(" /workspaces/015_workspace_cloud_configs" ),
@@ -369,10 +366,13 @@ internal class WorkspaceExecutionPlannerTest {
369366 config = null
370367 )
371368
372- assertThat(plan.workspaceConfig.notifications?.email?.recipients).containsExactly(
" [email protected] " )
373- assertThat(plan.workspaceConfig.notifications?.slack?.channels).containsExactly(" e2e-testing" )
374- assertThat(plan.workspaceConfig.executionOrder?.flowsOrder).containsExactly(" flowA" , " flowB" )
375- assertThat(plan.workspaceConfig.disableRetries).isTrue()
369+ val platformConfiguration = plan.workspaceConfig.platform
370+ assertThat(platformConfiguration).isEqualTo(
371+ PlatformConfiguration (
372+ android = PlatformConfiguration .AndroidConfiguration (disableAnimations = true ),
373+ ios = PlatformConfiguration .IOSConfiguration (disableAnimations = true , snapshotKeyHonorModalViews = false )
374+ )
375+ )
376376 }
377377
378378 private fun path (path : String ): Path ? {
0 commit comments