File tree Expand file tree Collapse file tree 2 files changed +10
-21
lines changed
java/ru/mystamps/web/tests/cases
robotframework/country/creation Expand file tree Collapse file tree 2 files changed +10
-21
lines changed Original file line number Diff line number Diff line change 38
38
39
39
import static ru .mystamps .web .tests .TranslationUtils .tr ;
40
40
import static ru .mystamps .web .tests .fest .PageWithFormAssert .assertThat ;
41
- import static ru .mystamps .web .validation .ValidationRules .COUNTRY_NAME_MAX_LENGTH ;
42
41
43
42
public class WhenAdminAddCountry extends WhenAnyUserAtAnyPageWithForm <AddCountryPage > {
44
43
@@ -83,26 +82,6 @@ public void shouldHaveStandardStructure() {
83
82
checkStandardStructure ();
84
83
}
85
84
86
- @ Test (groups = "invalid" , dependsOnGroups = "std" )
87
- public void countryNameEnShouldNotBeTooLong () {
88
- String longCountryName = StringUtils .repeat ("e" , COUNTRY_NAME_MAX_LENGTH + 1 );
89
- page .addCountry (longCountryName , TEST_COUNTRY_NAME_RU );
90
-
91
- assertThat (page )
92
- .field ("name" )
93
- .hasError (tr ("value.too-long" , COUNTRY_NAME_MAX_LENGTH ));
94
- }
95
-
96
- @ Test (groups = "invalid" , dependsOnGroups = "std" )
97
- public void countryNameRuShouldNotBeTooLong () {
98
- String longCountryName = StringUtils .repeat ("я" , COUNTRY_NAME_MAX_LENGTH + 1 );
99
- page .addCountry (TEST_COUNTRY_NAME_EN , longCountryName );
100
-
101
- assertThat (page )
102
- .field ("nameRu" )
103
- .hasError (tr ("value.too-long" , COUNTRY_NAME_MAX_LENGTH ));
104
- }
105
-
106
85
@ Test (groups = "invalid" , dependsOnGroups = "std" )
107
86
public void countryNameEnShouldBeUnique () {
108
87
page .addCountry (existingCountryNameEn , TEST_COUNTRY_NAME_RU );
Original file line number Diff line number Diff line change @@ -15,6 +15,16 @@ Create country with too short name
15
15
Element Text Should Be id=name.errors Value is less than allowable minimum of 3 characters
16
16
Element Text Should Be id=nameRu.errors Value is less than allowable minimum of 3 characters
17
17
18
+ Create country with too long name
19
+ [Documentation] Verify validation of too long name
20
+ ${englishLetter } = Set Variable j
21
+ ${russianLetter } = Set Variable я
22
+ Input Text id=name ${englishLetter * 51 }
23
+ Input Text id=nameRu ${russianLetter * 51 }
24
+ Submit Form id=add-country-form
25
+ Element Text Should Be id=name.errors Value is greater than allowable maximum of 50 characters
26
+ Element Text Should Be id=nameRu.errors Value is greater than allowable maximum of 50 characters
27
+
18
28
*** Keywords ***
19
29
Before Test Suite
20
30
[Documentation] Open browsers, register fail hook and login as admin
You can’t perform that action at this time.
0 commit comments