Skip to content

Commit

Permalink
#2158 Wrong message event return fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lucashimpens committed Jan 13, 2022
1 parent a8ae9bf commit d0f614f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1172,9 +1172,9 @@ private MessageEvent verifyElementTextDifferentCaseSensitiveCheck(String actual,
private MessageEvent verifyElementTextContainsCaseSensitiveCheck(String text, String textToSearch, String isCaseSensitive) {
MessageEvent mes;
if (ParameterParserUtil.parseBooleanParam(isCaseSensitive, false)) {
mes = text.contains(textToSearch) ? new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_ELEMENTTEXTCONTAINS) : new MessageEvent(MessageEventEnum.CONTROL_FAILED_CONTAINS);
mes = text.contains(textToSearch) ? new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_ELEMENTTEXTCONTAINS) : new MessageEvent(MessageEventEnum.CONTROL_FAILED_ELEMENTTEXTCONTAINS);
} else {
mes = text.toLowerCase().contains(textToSearch.toLowerCase()) ? new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_ELEMENTTEXTCONTAINS) : new MessageEvent(MessageEventEnum.CONTROL_FAILED_CONTAINS);
mes = text.toLowerCase().contains(textToSearch.toLowerCase()) ? new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_ELEMENTTEXTCONTAINS) : new MessageEvent(MessageEventEnum.CONTROL_FAILED_ELEMENTTEXTCONTAINS);
}
return mes;
}
Expand Down
4 changes: 2 additions & 2 deletions source/src/main/java/org/cerberus/enums/MessageEventEnum.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public enum MessageEventEnum {
CONTROL_SUCCESS_NOTVISIBLE(300, "OK", "Element '%STRING1%' is present and not visible on the page.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
CONTROL_SUCCESS_ELEMENTTEXTEQUAL(300, "OK", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is equal to %VALUE% (%CASESENSITIVE%).", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
CONTROL_SUCCESS_ELEMENTTEXTDIFFERENT(300, "OK", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is different than %VALUE% (%CASESENSITIVE%).", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
CONTROL_SUCCESS_ELEMENTTEXTCONTAINS(300, "OK", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' contains %VALUE% (%CASESENSITIVE%).", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
CONTROL_SUCCESS_ELEMENTTEXTCONTAINS(300, "OK", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' contains '%VALUE%' (%CASESENSITIVE%).", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
CONTROL_SUCCESS_ELEMENTNUMERICEQUAL(300, "OK", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is equal than %VALUE%.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
CONTROL_SUCCESS_ELEMENTNUMERICDIFFERENT(300, "OK", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is different than %VALUE%.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
CONTROL_SUCCESS_ELEMENTNUMERICGREATER(300, "OK", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is greater than %VALUE%.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED),
Expand Down Expand Up @@ -415,7 +415,7 @@ public enum MessageEventEnum {
CONTROL_FAILED_ELEMENTTEXTDIFFERENT(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is not different than %VALUE% (%CASESENSITIVE%).", true, true, true, MessageGeneralEnum.EXECUTION_KO),
CONTROL_FAILED_ELEMENTNUMERICEQUAL(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is not equal to %VALUE%.", true, true, true, MessageGeneralEnum.EXECUTION_KO),
CONTROL_FAILED_ELEMENTNUMERICDIFFERENT(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is not different than %VALUE%.", true, true, true, MessageGeneralEnum.EXECUTION_KO),
CONTROL_FAILED_ELEMENTTEXTCONTAINS(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' does not contain %VALUE% (%CASESENSITIVE%).", true, true, true, MessageGeneralEnum.EXECUTION_KO),
CONTROL_FAILED_ELEMENTTEXTCONTAINS(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' does not contain '%VALUE%' (%CASESENSITIVE%).", true, true, true, MessageGeneralEnum.EXECUTION_KO),
CONTROL_FAILED_ELEMENTNUMERICGREATER(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is not greater than %VALUE%.", true, true, true, MessageGeneralEnum.EXECUTION_KO),
CONTROL_FAILED_ELEMENTNUMERICGREATEROREQUAL(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is not greater or equal to %VALUE%.", true, true, true, MessageGeneralEnum.EXECUTION_KO),
CONTROL_FAILED_ELEMENTNUMERICMINOR(367, "KO", "Element '%ELEMENT%' with value '%ELEMENTVALUE%' is not lower than %VALUE%.", true, true, true, MessageGeneralEnum.EXECUTION_KO),
Expand Down

0 comments on commit d0f614f

Please sign in to comment.