Skip to content

Develop#1

Open
ElenaBar-32 wants to merge 11 commits intomainfrom
develop
Open

Develop#1
ElenaBar-32 wants to merge 11 commits intomainfrom
develop

Conversation

@ElenaBar-32
Copy link
Copy Markdown
Owner

В классах Base добавлены 2 браузера, один из них закомментирован, поэтому в импорте браузеры могут быть не активны.

Comment thread src/main/java/page/MainOrderPage.java Outdated
private final By orderConfirmationField = By.xpath(".//button[contains(@class, 'Button_Middle') and text() = 'Заказать']");
private final By yesButton = By.xpath(".//button[contains(@class, 'Button_Middle') and text() = 'Да']");
private final By orderCreatedField = By.className("Order_Modal__YZ-d3");
private final String URL = "https://qa-scooter.praktikum-services.ru/";
Copy link
Copy Markdown

@Ayantea1 Ayantea1 Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: константу лучше вынести в отдельный класс, Сейчас у тебя один урл в двух классах

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL оставила в 1м классе

@@ -0,0 +1,13 @@
package $org.example;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: не должно быть лишнего кода

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалила

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

папка resources не должна быть проиндексирована. Все еще вижу ее в проекте

Image

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалила папку resources

import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: не должно быть закомментированного кода

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

исправила


@Before

public void start() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: у тебя уже есть класс для предусловия - запуска драйвера. Он будет одинаковым для любых тестов, не дублируй код

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

оставила один класс Base

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

класс не используется, но все еще есть в коде

};
}
@Test
public void buttonOrderTest() {
Copy link
Copy Markdown

@Ayantea1 Ayantea1 Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: нельзя сворачивать весь тест в один метод. Тест должен быть читаем: в нем должны быть названы шаги и указано ожидание
сейчас тесты ничего не проверяют

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тест разбила .
Шаги заполнения формы объединены в один метод, а кнопки Заказать и Далее вынесены в отдельные методы в Test

Comment thread pom.xml
@@ -0,0 +1,36 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: должен быть только один Pom файл

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

исправлено

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не исправлено, в проекте все еще 2 файла

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалила

@@ -0,0 +1,9 @@
<archetype>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: не должно быть файлов с настройками в проекте

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

отправила в .gitignore

в readme ссылка на скрин запуска тестов
Comment thread pom.xml
<name>Archetype - Sprint_4</name>
<url>http://maven.apache.org</url>


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: отсутствует настройка на java 11

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавлена зависимость в pom.xml

Comment thread src/main/java/page/MainOrderPage.java Outdated
}
// методы аренды

public void fillingOutRentalFields(String data, String dropdownOption, String ScooterColor, String comment) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: dropdownOption не используется в методе

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

исправлено

Comment thread src/test/java/OrderTest.java Outdated
orderStepsPage.rentSteps(data, dropdownOption, scooterColor,comment);
orderStepsPage.getOrderConfirmation();
orderStepsPage.clickYesButton();
orderStepsPage.getOrderCreatedField();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: тест все еще ничего не проверяет, отсутствует ассерт

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавила проверку ассертом

public void buttonOrderTest2 () {
mainQuestionPage.openPage();
mainQuestionPage.clickCookieButton();
orderStepsPage.clickOrderButton2();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: тест ничего не проверяет

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавила проверку ассертом перехода на страницу "Для кого самокат"


}
@Test
public void buttonOrderTest2 () {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно улучшить: для этого теста не нужна параметризация, избыточно проходить его дважды.

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

Successfully merging this pull request may close these issues.

2 participants