Skip to content

Default steps refactored #78

Closed

Conversation

alkekkonen
Copy link
Contributor

DefaultSteps class divided into four classes
DefaultStepsTest class divided into four classes
Imports optimized

alkekkonen and others added 23 commits December 25, 2017 17:14
…Sequence

# Conflicts:
#	src/main/java/ru/alfabank/steps/DefaultSteps.java
#	src/test/java/ru/alfabank/steps/DefaultStepsTest.java
• Public access for string generator method
# Conflicts:
#	src/main/java/ru/alfabank/steps/DefaultSteps.java
#	src/test/java/ru/alfabank/steps/DefaultStepsTest.java
Default steps rebased
DefaultStepsTest class divided into four classes
Imports optimized
@coveralls
Copy link

coveralls commented Jun 9, 2018

Coverage Status

Coverage decreased (-0.1%) to 77.881% when pulling 4128534 on alkekkonen:DefaultSteps-refactor into 83aa1ce on alfa-laboratory:master.

/**
* Шаги для тестирования элеменотв страницы, доступные по умолчанию в каждом новом проекте.
*
* В akitaScenario используется хранилище переменных. Для сохранения/изъятия переменных используются методы setVar/getVar
Copy link
Collaborator

Choose a reason for hiding this comment

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

это описание не относится непосредственно к классу ElementSteps. В InputFieldSteps тоже.
Лучше в readme вынести

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ок.

/**
* Проверка, что кнопка/ссылка недоступна для нажатия
*/
@Тогда("^(?:ссылка|кнопка) \"([^\"]*)\" недоступна для нажатия$")
Copy link
Collaborator

Choose a reason for hiding this comment

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

кажется этот и следующий шаги идентичны)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

И действительно. Подумаю, как это по-русски склеить в один.

*/

@Slf4j
public class ElementSteps {
Copy link
Collaborator

Choose a reason for hiding this comment

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

может еще разбить, на ElementInteractionSteps и ElementVerificationSteps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Логика тут есть, только нужно ли. Сейчас получается четыре примерно равных класса, а так будет три больших и два совсем куцых.

Copy link
Collaborator

Choose a reason for hiding this comment

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

много мелких - более правильный подход. в них искать/добавлять легче. есть если дублирующиеся шаги - быстрее обнаружить получиться, Single Responsibility типа) я бы разбила вообще на InputInteractionSteps, InputVerificationSteps, ElementsInteractionSteps, ElementsVerificationSteps, ListInteractionSteps и т.д
Кажется так будет проще поддерживать все это многообразие степдефов

…remove

# Conflicts:
#	src/main/java/ru/alfabank/steps/DefaultSteps.java
#	src/test/java/ru/alfabank/other/AkitaPageTest.java
#	src/test/java/ru/alfabank/steps/DefaultStepsTest.java
…nteractionSteps, InputFieldSteps, ListSteps and WebPageSteps

* DefaultStepsTest class splitted (analogically)
* ReadMe updated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants