Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Пишем обычный тест #2

Open
eroshenkoam opened this issue Jun 19, 2020 · 1 comment
Open

Пишем обычный тест #2

eroshenkoam opened this issue Jun 19, 2020 · 1 comment

Comments

@eroshenkoam
Copy link
Owner

eroshenkoam commented Jun 19, 2020

    @Test
    @DisplayName("Открываем сщуствующую Issue")
    public void testIssue() {
        step("Открываем главную страницу", () -> {
            open("https://github.com");
        });
        step("Открываем страницу с репозиторием", () -> {
            $x("//*[contains(@class, 'header-search-input')]").click();
            $x("//*[contains(@class, 'header-search-input')]").sendKeys("eroshenkoam/allure-example");
            $x("//*[contains(@class, 'header-search-input')]").submit();
            $x("//a[@href='/eroshenkoam/allure-example']").click();
        });
        step("Открываем страницу с задачами в репозитории", () -> {
            $x("//a[contains(@data-selected-links, 'repo_issues')]").click();
        });
        step("Проверяем title", () -> {
            $x("//a[@id='issue_12_link']").click();
            $x("//h1[contains(@class, 'gh-header-title')]").should(Condition.text("Hello, World!"));
        });

    }

@komissarov-qa-auto
Copy link

задача Hello world уехала на 2 страницу, в код нужно добавить строку

step("Открываем страницу с задачами в репозитории", () -> {
$x("//a[contains(@data-selected-links, 'repo_issues')]").click();
$x("//a[@aria-label='Page 2']").click(); <---
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants