Skip to content

Commit c8241da

Browse files
committed
WhenAdminAddCountry.shouldCreateCountryWithNameInTwoLanguages: port to Robot Framework.
Addressed to #530 No functional changes.
1 parent a2198d3 commit c8241da

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
public class WhenAdminAddCountry extends WhenAnyUserAtAnyPageWithForm<AddCountryPage> {
4343

4444
private static final String TEST_COUNTRY_NAME_EN = "Russia";
45-
private static final String TEST_COUNTRY_NAME_RU = "Россия";
4645

4746
@Value("${valid_admin_login}")
4847
private String validAdminLogin;
@@ -90,18 +89,7 @@ public void countryNameRuWithAllowedCharactersShouldBeAccepted() {
9089
assertThat(page).field("nameRu").hasNoError();
9190
}
9291

93-
@Test(groups = "logic", dependsOnGroups = { "std", "invalid", "valid", "misc" })
94-
public void shouldCreateCountryWithNameInTwoLanguages() {
95-
page.addCountry(TEST_COUNTRY_NAME_EN, TEST_COUNTRY_NAME_RU);
96-
97-
String expectedUrl = Url.INFO_COUNTRY_PAGE
98-
.replace("{slug}", TEST_COUNTRY_NAME_EN.toLowerCase());
99-
100-
assertThat(page.getCurrentUrl()).matches(expectedUrl);
101-
assertThat(page.getHeader()).isEqualTo("Stamps of " + TEST_COUNTRY_NAME_EN);
102-
}
103-
104-
@Test(groups = "logic", dependsOnMethods = "shouldCreateCountryWithNameInTwoLanguages")
92+
@Test(groups = "logic")
10593
public void countryShouldBeAvailableForChoosingAtPageWithSeries() {
10694
page.open(Url.ADD_SERIES_PAGE);
10795

src/test/robotframework/country/creation/logic.robot

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Create country with name in English
1414
Location Should Be ${SITE_URL}/country/germany
1515
Element Text Should Be id=page-header Stamps of Germany
1616

17+
Create country with name in English and Russian
18+
[Documentation] Verify creation of country by specifying names in 2 languages
19+
Input Text id=name Russia
20+
Input Text id=nameRu Россия
21+
Submit Form id=add-country-form
22+
Location Should Be ${SITE_URL}/country/russia
23+
Element Text Should Be id=page-header Stamps of Russia
24+
1725
*** Keywords ***
1826
Before Test Suite
1927
[Documentation] Open browsers, register fail hook and login as admin

0 commit comments

Comments
 (0)