All Downloads are FREE. Search and download functionalities are using the official Maven repository.

maestro.orchestra.MaestroConfig.kt Maven / Gradle / Ivy

Go to download

Maestro is a server-driven platform-agnostic library that allows to drive tests for both iOS and Android using the same implementation through an intuitive API.

There is a newer version: 1.38.1
Show newest version
package maestro.orchestra

import maestro.js.JsEngine
import maestro.orchestra.util.Env.evaluateScripts

// Note: The appId config is only a yaml concept for now. It'll be a larger migration to get to a point
// where appId is part of MaestroConfig (and factored out of MaestroCommands - eg: LaunchAppCommand).
data class MaestroConfig(
    val appId: String? = null,
    val name: String? = null,
    val tags: List? = emptyList(),
    val initFlow: MaestroInitFlow? = null,
    val ext: Map = emptyMap(),
) {

    fun evaluateScripts(jsEngine: JsEngine): MaestroConfig {
        return copy(
            appId = appId?.evaluateScripts(jsEngine),
            name = name?.evaluateScripts(jsEngine),
            initFlow = initFlow?.evaluateScripts(jsEngine),
        )
    }

}

data class MaestroInitFlow(
    val appId: String,
    val commands: List,
) {

    fun evaluateScripts(jsEngine: JsEngine): MaestroInitFlow {
        return copy(
            appId = appId.evaluateScripts(jsEngine),
        )
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy