Skip to content

Commit 3850a83

Browse files
committed
WhenAnonymousUserActivateAccount.activationShouldPassWhenUserProvidedEmptyName(): port to Robot Framework.
Addressed to #530 No functional changes.
1 parent eb6329e commit 3850a83

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

src/main/resources/test/spring/test-data.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ invalid_user_login = test
1616
invalid_user_password = test
1717

1818
# these users should be just registered but not activated
19-
# (used only in WhenAnonymousUserActivateAccount and src/test/robotframework/account/activation/logic.robot)
19+
# (used only in src/test/robotframework/account/activation/logic.robot)
2020
not_activated_user1_act_key = 7777744444
2121
not_activated_user2_act_key = 4444477777
2222

src/test/java/ru/mystamps/web/tests/cases/WhenAnonymousUserActivateAccount.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*/
1818
package ru.mystamps.web.tests.cases;
1919

20-
import static org.fest.assertions.api.Assertions.assertThat;
21-
2220
import org.apache.commons.lang3.StringUtils;
2321

2422
import org.springframework.beans.factory.annotation.Value;
@@ -30,7 +28,6 @@
3028
import ru.mystamps.web.Url;
3129
import ru.mystamps.web.tests.page.ActivateAccountPage;
3230

33-
import static ru.mystamps.web.tests.TranslationUtils.stripHtmlTags;
3431
import static ru.mystamps.web.tests.TranslationUtils.tr;
3532
import static ru.mystamps.web.tests.fest.PageWithFormAssert.assertThat;
3633
import static ru.mystamps.web.validation.ValidationRules.LOGIN_MIN_LENGTH;
@@ -46,9 +43,6 @@ public class WhenAnonymousUserActivateAccount
4643
@Value("${valid_user_login}")
4744
private String validUserLogin;
4845

49-
@Value("${not_activated_user2_act_key}")
50-
private String secondNotActivatedUserActKey;
51-
5246
public WhenAnonymousUserActivateAccount() {
5347
super(ActivateAccountPage.class);
5448
}
@@ -280,21 +274,6 @@ public void wrongActivationKeyShouldBeRejected() {
280274
.hasError(tr("ru.mystamps.web.support.beanvalidation.ExistingActivationKey.message"));
281275
}
282276

283-
@Test(groups = "logic", dependsOnGroups = { "std", "invalid", "valid", "misc" })
284-
public void activationShouldPassWhenUserProvidedEmptyName() {
285-
page.activateAccount(
286-
"2nd-test-login",
287-
"",
288-
"test-password",
289-
"test-password",
290-
secondNotActivatedUserActKey
291-
);
292-
293-
assertThat(page.getCurrentUrl()).isEqualTo(Url.AUTHENTICATION_PAGE);
294-
295-
assertThat(page.textPresent(stripHtmlTags(tr("t_activation_successful")))).isTrue();
296-
}
297-
298277
@DataProvider(name = "validNames")
299278
public Object[][] getValidNames() {
300279
return new Object[][] {

src/test/robotframework/account/activation/logic.robot

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ Activate account with full info
1818
Location Should Be ${SITE_URL}/account/auth
1919
Element Text Should Be id=msg-success Account successfully activated! Now you can pass authentication.
2020

21+
Activate account with only required info
22+
[Documentation] Verify account activation by filling only mandatory fields
23+
Input Text id=login 2nd-test-login
24+
Input Text id=name ${EMPTY}
25+
Input Text id=password test-password
26+
Input Text id=passwordConfirmation test-password
27+
Input Text id=activationKey 4444477777
28+
Submit Form id=activate-account-form
29+
Location Should Be ${SITE_URL}/account/auth
30+
Element Text Should Be id=msg-success Account successfully activated! Now you can pass authentication.
31+
2132
*** Keywords ***
2233
Before Test Suite
2334
[Documentation] Open browser and register fail hook

0 commit comments

Comments
 (0)