Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #353 from sbtqa/bugfix/conditions
Browse files Browse the repository at this point in the history
Fixes #352
  • Loading branch information
clicman authored Oct 7, 2021
2 parents cbaa437 + 5e8c0be commit 030874f
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void close(String accordionName) {
accordionSteps.close(accordionName);
}

@When("^accordion is (not )?opened \"([^\"]*)\"$")
@When("^accordion is (opened|not opened) \"([^\"]*)\"$")
public void checkAccordionOpened(ContainCondition condition, String accordionName) {
accordionSteps.checkAccordionOpened(condition, accordionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void select(String flagName) {
controlSteps.select(flagName);
}

@Когда("^control \"([^\"]*)\" is (not )?marked$")
@Когда("^control \"([^\"]*)\" is (marked|not marked)$")
public void isSelected(String flagName, ContainCondition condition) {
controlSteps.isSelected(flagName, condition);
}
Expand All @@ -24,7 +24,7 @@ public void selectByValue(String flagName, String value) {
controlSteps.selectByValue(flagName, value);
}

@И("^in radio group \"([^\"]*)\" is (not )?marked value \"([^\"]*)\"$")
@И("^in radio group \"([^\"]*)\" is (marked|not marked) value \"([^\"]*)\"$")
public void isRadiobuttonSelected(String groupName, ContainCondition condition, String value) {
controlSteps.isRadiobuttonSelected(groupName, condition, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void containsText(String hintName, String text) {
hintSteps.containsText(hintName, text);
}

@Когда("^user checks that the hint \"([^\"]*)\" is (not )?displayed$")
@Когда("^user checks that the hint \"([^\"]*)\" is (displayed|not displayed)$")
public void isOpen(String hintName, ContainCondition condition) {
hintSteps.isOpen(condition, hintName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ public void elementsAlwaysPresent(Presence present, List<String> elementNames) {
htmlSteps.elementsAlwaysPresent(present, elementNames);
}

@Когда("^elements is (not )?editable$")
@Когда("^elements is (editable|not editable)$")
public void elementsPresentAndDisabled(ContainCondition condition, List<String> elementNames) {
htmlSteps.elementsPresentAndDisabled(condition, elementNames);
}

@Когда("^element \"([^\"]*)\" is (not )?editable$")
@Когда("^element \"([^\"]*)\" is (editable|not editable)$")
public void elementPresentAndDisabled(String elementName, ContainCondition condition ) {
htmlSteps.elementPresentAndDisabled(elementName, condition );
}

@Когда("^button \"([^\"]*)\" is (not )?selected$")
@Когда("^button \"([^\"]*)\" is (selected|not selected)$")
public void elementsPresentAndSelected(String elementName, ContainCondition condition) {
htmlSteps.elementsPresentAndSelected(condition, elementName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void close(String accordionName) {
accordionSteps.close(accordionName);
}

@Когда("^содержимое аккордеона \"([^\"]*)\" (не )?отображается$")
@Когда("^содержимое аккордеона \"([^\"]*)\" (отображается|не отображается)$")
public void checkAccordionOpened(String accordionName, ContainCondition condition) {
accordionSteps.checkAccordionOpened(condition, accordionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void select(String flagName) {
controlSteps.select(flagName);
}

@Когда("^признак \"([^\"]*)\" (не )?отмечен$")
@Когда("^признак \"([^\"]*)\" (отмечен|не отмечен)$")
public void isSelected(String flagName, ContainCondition condition) {
controlSteps.isSelected(flagName, condition);
}
Expand All @@ -24,7 +24,7 @@ public void selectByValue(String flagName, String value) {
controlSteps.selectByValue(flagName, value);
}

@И("^в радио группе \"([^\"]*)\" (не )?отмечено значение \"([^\"]*)\"$")
@И("^в радио группе \"([^\"]*)\" (отмечено|не отмечено) значение \"([^\"]*)\"$")
public void isRadiobuttonSelected(String groupName, ContainCondition condition, String value) {
controlSteps.isRadiobuttonSelected(groupName, condition, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void containsText(String hintName, String text) {
hintSteps.containsText(hintName, text);
}

@Когда("^(?:пользователь |он )?проверяет что подсказка \"([^\"]*)\" (не )?отображается$")
@Когда("^(?:пользователь |он )?проверяет что подсказка \"([^\"]*)\" (отображается|не отображается)$")
public void isOpen(String hintName, ContainCondition condition) {
hintSteps.isOpen(condition, hintName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ public void tearDown() {
}

@И("^(?:пользователь |он )?в блоке \"([^\"]*)\" \\(([^)]*)\\)$")
public void actionInBlock(String block, String action) throws NoSuchMethodException {
public void actionInBlock(String block, String action) {
htmlSteps.actionInBlock(block, action);
}

@И("^(?:пользователь |он )?в блоке \"([^\"]*)\" \\(([^)]*)\\) с параметрами из таблицы$")
public void actionInBlock(String block, String action, DataTable dataTable) throws NoSuchMethodException {
public void actionInBlock(String block, String action, DataTable dataTable) {
htmlSteps.actionInBlock(block, action, dataTable);
}

@И("^(?:пользователь |он )?в блоке \"([^\"]*)\" \\(([^)]*)\\) с параметром \"([^\"]*)\"$")
public void actionInBlock(String block, String action, String param) throws NoSuchMethodException {
public void actionInBlock(String block, String action, String param) {
htmlSteps.actionInBlock(block, action, param);
}

@И("^(?:пользователь |он )?в блоке \"([^\"]*)\" \\(([^)]*)\\) с параметрами \"([^\"]*)\" \"([^\"]*)\"$")
public void actionInBlock(String block, String action, String param1, String param2) throws NoSuchMethodException {
public void actionInBlock(String block, String action, String param1, String param2) {
htmlSteps.actionInBlock(block, action, param1, param2);
}

Expand All @@ -60,30 +60,30 @@ public void fillForm(DataTable dataTable) {
}

@Когда("^элемент обязательно (при|от)сутствует на странице \"([^\"]*)\"$")
@И("^(присутствует|не отображается) элемент \"([^\"]*)\"$")
@И("^(присутствует|не отображается|отображается) элемент \"([^\"]*)\"$")
public void elementAlwaysPresent(Presence present, String elementName) {
htmlSteps.elementAlwaysPresent(present, elementName);
}

@Когда("^элементы обязательно (при|от)сутствуют на странице$")
@И("^(присутствуют|не отображаются) элементы$")
@И("^(присутствуют|не отображаются|отображаются) элементы$")
public void elementsAlwaysPresent(Presence present, List<String> elementNames) {
htmlSteps.elementsAlwaysPresent(present, elementNames);
}

@Когда("^элементы (не)?доступны для редактирования$")
@И("^присутствуют (не)?активные элементы$")
@Когда("^элементы (доступны|не доступны) для редактирования$")
@И("^присутствуют (активные|не активные) элементы$")
public void elementsPresentAndDisabled(ContainCondition condition, List<String> elementNames) {
htmlSteps.elementsPresentAndDisabled(condition, elementNames);
}

@Когда("^элемент \"([^\"]*)\" (не)?доступен для редактирования$")
@И("^элемент \"([^\"]*)\" (не)?активен$")
@Когда("^элемент \"([^\"]*)\" (доступен|не доступен) для редактирования$")
@И("^элемент \"([^\"]*)\" (активен|не активен)$")
public void elementPresentAndDisabled(String elementName, ContainCondition condition) {
htmlSteps.elementPresentAndDisabled(elementName, condition);
}

@Когда("^(не )?выбрана кнопка \"([^\"]*)\"$")
@Когда("^(выбрана|не выбрана) кнопка \"([^\"]*)\"$")
public void elementsPresentAndSelected(ContainCondition condition, String elementName) {
htmlSteps.elementsPresentAndSelected(condition, elementName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ page.package=ru.sbtqa.tag.pagefactory.pages
screenshot.strategy=driver

webdriver.browser.name=Chrome
webdriver.version = 91.0.4472.101
webdriver.version = 94.0.4606.41
webdriver.starting.url=http://localhost:8181

# run chrome in headless mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ page.package = pagefactory.pages.webelements
screenshot.strategy = driver

webdriver.browser.name = Chrome
webdriver.version = 91.0.4472.101
webdriver.version = 94.0.4606.41
webdriver.starting.url = http://localhost:8181

# run chrome in headless mode
Expand Down

0 comments on commit 030874f

Please sign in to comment.