File tree Expand file tree Collapse file tree 2 files changed +21
-11
lines changed
java/ru/mystamps/web/tests/cases
robotframework/account/registration Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change 17
17
*/
18
18
package ru .mystamps .web .tests .cases ;
19
19
20
- import org .apache .commons .lang3 .StringUtils ;
21
20
import org .springframework .beans .factory .annotation .Value ;
22
21
import org .subethamail .wiser .Wiser ;
23
22
import org .subethamail .wiser .WiserMessage ;
40
39
import static ru .mystamps .web .tests .TranslationUtils .stripHtmlTags ;
41
40
import static ru .mystamps .web .tests .TranslationUtils .tr ;
42
41
import static ru .mystamps .web .tests .fest .PageWithFormAssert .assertThat ;
43
- import static ru .mystamps .web .validation .ValidationRules .EMAIL_MAX_LENGTH ;
44
42
45
43
public class WhenAnonymousUserRegisterAccount
46
44
extends WhenAnyUserAtAnyPage <RegisterAccountPage > {
@@ -92,15 +90,6 @@ public void shouldExistsMessageWithLinkToAuthenticationPage() {
92
90
.isTrue ();
93
91
}
94
92
95
- @ Test (groups = "invalid" )
96
- public void emailShouldNotBeTooLong () {
97
- page .registerUser (StringUtils .repeat ("0" , EMAIL_MAX_LENGTH ) + "@mail.ru" );
98
-
99
- assertThat (page )
100
- .field ("email" )
101
- .hasError (tr ("value.too-long" , EMAIL_MAX_LENGTH ));
102
- }
103
-
104
93
@ Test (groups = "invalid" , dataProvider = "invalidEmails" )
105
94
public void emailShouldBeValid (String invalidEmail , String expectedMessage ) {
106
95
page .registerUser (invalidEmail );
Original file line number Diff line number Diff line change
1
+ *** Settings ***
2
+ Documentation Verify account registration validation scenarios
3
+ Library SeleniumLibrary
4
+ Suite Setup Before Test Suite
5
+ Suite Teardown After Test Suite
6
+ Force Tags account registration validation
7
+
8
+ *** Test Cases ***
9
+ Register account with too long email
10
+ ${anyCharacter } = Set Variable 0
11
+ Input Text id=email ${anyCharacter * 255 } @mail.ru
12
+ Submit Form id=register-account-form
13
+ Element Text Should Be id=email.errors Value is greater than allowable maximum of 255 characters
14
+
15
+ *** Keywords ***
16
+ Before Test Suite
17
+ Open Browser ${SITE_URL } /account/register ${BROWSER }
18
+ Register Keyword To Run On Failure Log Source
19
+
20
+ After Test Suite
21
+ Close Browser
You can’t perform that action at this time.
0 commit comments