chulietta / add-allure-to-tests

0 stars 0 forks source link

Добавить тест #1

Open chulietta opened 3 years ago

chulietta commented 3 years ago

Добавляем зависимости:

dependencies {
    testImplementation (
            "com.codeborne:selenide:5.18.0",
            "org.junit.jupiter:junit-jupiter-api:5.7.0",
            "org.junit.jupiter:junit-jupiter-engine:5.6.2",
            "org.junit.jupiter:junit-jupiter-params:5.6.2"
    )
    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.0"
}

Обозначаем входные параметры:

private static final String BASE_URL = "http://github.com";
private final static String REPOSITORY = "chulietta/qa_guru-4_5";
private final static String ISSUE_NAME = "First Issue";

Пишем простой тест на Selenide:

open(BASE_URL);
$(".header-search-input").setValue(REPOSITORY).pressEnter();
$(By.linkText(REPOSITORY)).click();
$(withText("Issues")).click();
$(withText(ISSUE_NAME)).shouldBe(visible);