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

com.personio.synthetics.step.ui.RefreshStep.kt Maven / Gradle / Ivy

There is a newer version: 2.7.0
Show newest version
package com.personio.synthetics.step.ui

import com.datadog.api.client.v1.model.SyntheticsStep
import com.datadog.api.client.v1.model.SyntheticsStepType
import com.personio.synthetics.client.BrowserTest
import com.personio.synthetics.model.Params
import com.personio.synthetics.step.addStep

/**
 * Adds a new navigation step for refreshing the active page to the synthetic browser test
 * @param stepName Name of the step
 * @return Synthetic step object with refreshStep added
 */
fun BrowserTest.refreshStep(
    stepName: String,
    f: (SyntheticsStep.() -> Unit)? = null,
) = addStep(stepName) {
    type = SyntheticsStepType.REFRESH
    params = Params()
    if (f != null) f()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy