package cz.moneta.test.harness.annotations;

import cz.moneta.test.harness.HarnessJunit5Extension;
import cz.moneta.test.harness.data.Browser;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This annotation is used for managing parallel test execution.
 * Test class with this annotation will not be executed in parallel to other classes with this annotation.
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RunWith(JUnitPlatform.class)
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@ExtendWith(HarnessJunit5Extension.class)
public @interface NonConcurrentTestScenario {

    String name() default "";

    Browser[] browsers() default {Browser.MS_EDGE, Browser.GOOGLE_CHROME};
}
