|
23 | 23 | import org.testng.annotations.AfterClass;
|
24 | 24 | import org.testng.annotations.BeforeClass;
|
25 | 25 | import org.testng.annotations.BeforeMethod;
|
26 |
| -import org.testng.annotations.DataProvider; |
27 | 26 | import org.testng.annotations.Test;
|
28 | 27 | import ru.mystamps.web.Url;
|
29 | 28 | import ru.mystamps.web.tests.page.RegisterAccountPage;
|
@@ -90,21 +89,14 @@ public void shouldExistsMessageWithLinkToAuthenticationPage() {
|
90 | 89 | .isTrue();
|
91 | 90 | }
|
92 | 91 |
|
93 |
| - @Test(groups = "invalid", dataProvider = "invalidEmails") |
94 |
| - public void emailShouldBeValid(String invalidEmail, String expectedMessage) { |
95 |
| - page.registerUser(invalidEmail); |
96 |
| - |
97 |
| - assertThat(page).field("email").hasError(expectedMessage); |
98 |
| - } |
99 |
| - |
100 | 92 | @Test(groups = "misc")
|
101 | 93 | public void emailShouldBeStripedFromLeadingAndTrailingSpaces() {
|
102 | 94 | page.registerUser(" test ");
|
103 | 95 |
|
104 | 96 | assertThat(page).field("email").hasValue("test");
|
105 | 97 | }
|
106 | 98 |
|
107 |
| - @Test(groups = "logic", dependsOnGroups = { "invalid", "misc" }) |
| 99 | + @Test(groups = "logic", dependsOnGroups = { "misc" }) |
108 | 100 | public void successfulMessageShouldBeShownAfterRegistration() {
|
109 | 101 | page. registerUser( "[email protected]");
|
110 | 102 |
|
@@ -158,14 +150,4 @@ public void emailWithActivationKeyShouldBeSentAfterRegistration()
|
158 | 150 | .isTrue();
|
159 | 151 | }
|
160 | 152 |
|
161 |
| - @DataProvider(name = "invalidEmails") |
162 |
| - public Object[][] getInvalidEmails() { |
163 |
| - String expectedErrorMessage = tr("ru.mystamps.web.support.beanvalidation.Email.message"); |
164 |
| - |
165 |
| - return new Object[][] { |
166 |
| - {"login", expectedErrorMessage}, |
167 |
| - {"login@domain", expectedErrorMessage} |
168 |
| - }; |
169 |
| - } |
170 |
| - |
171 | 153 | }
|
0 commit comments