Skip to content

Commit db607a7

Browse files
author
Kamil Nowocin
committed
feat: Visual design update
1 parent 73d795b commit db607a7

19 files changed

+44
-41
lines changed

src/test/java/com/steps/AuthenticationPageSteps.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void iCanSeeLoginForm() throws Throwable {
2727
String.format(VIEW_ERROR, "Login form"));
2828
}
2929

30-
@Step("I enter login {0}")
30+
@Step("I enter login *{0}*")
3131
@And("I enter login {string}")
3232
public void iEnterLogin(String login) throws Throwable {
3333
//ACT//
@@ -39,7 +39,7 @@ public void iEnterLogin(String login) throws Throwable {
3939
login.toLowerCase(), VALUE_ERROR);
4040
}
4141

42-
@Step("I enter password {0}")
42+
@Step("I enter password *{0}*")
4343
@And("I enter password {string}")
4444
public void iEnterPassword(String password) throws Throwable {
4545
//ACT//
@@ -58,7 +58,7 @@ public void iClickOnSubmitButton() throws Throwable {
5858
}
5959

6060

61-
@Step("I can see warning message with include {0}")
61+
@Step("I can see warning message with include *{0}*")
6262
@Then("I can see warning message with include {string}")
6363
public void iCanSeeWarningMessageWithInclude(String warningMessage) throws Throwable {
6464
Assert.assertTrue(basePage.errorValidator(authenticationPage.registeredLoginError).toLowerCase().contains(warningMessage.toLowerCase()),

src/test/java/com/steps/CustomerServicePageSteps.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void iAmOnCustomerServiceContactUsPageForm() throws Throwable {
4646
String.format(VIEW_ERROR, "Customer Service Contact Us page form"));
4747
}
4848

49-
@Step("I choose Subject Heading {string}")
49+
@Step("I choose Subject Heading *{0}*")
5050
@When("I choose Subject Heading {string}")
5151
public void iChooseSubjectHeading(String subjectHeading) throws Throwable {
5252
//ACT//
@@ -152,14 +152,14 @@ public void iClickSendButton() throws Throwable {
152152
}
153153

154154

155-
@Step("I can see success message {0}")
155+
@Step("I can see success message *{0}*")
156156
@And("I can see success message {string}")
157157
public void iCanSeeSuccessMessage(String successMessage) throws Throwable {
158158
Assert.assertTrue(customerServicePage.contactUsSuccessMessage.getText().toLowerCase().contains
159159
(successMessage.toLowerCase()), String.format(MESSAGE_DIDNT_CONTAIN, successMessage.toUpperCase()));
160160
}
161161

162-
@Step("I can see error message {0}")
162+
@Step("I can see error message *{0}*")
163163
@And("I can see error message {string}")
164164
public void iCanSeeErrorMessage(String errorMessage) throws Throwable {
165165
Assert.assertTrue(customerServicePage.contactUsErrorMessage.getText().toLowerCase().contains

src/test/java/com/steps/MainPageSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void iCanSeeAutomationpracticeComWebsite() throws Throwable {
5757
Assert.assertTrue(isPageReadyToExecuteTests, PAGE_ERROR);
5858
}
5959

60-
@Step("I am logged as customer {string} using {string} password")
60+
@Step("I am logged as customer *{0}* using *{0}* password")
6161
@When("I am logged as customer {string} using {string} password")
6262
public void iAmLoggedAsCustomerUsingPassword(String email, String password) throws Throwable {
6363
//ARRANGE//

src/test/java/com/steps/RegistrationPageSteps.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public void iWriteMyAddress() throws Throwable {
372372
userAddress.toLowerCase(), VALUE_ERROR);
373373
}
374374

375-
@Step("I choose country {0}")
375+
@Step("I choose country *{0}*")
376376
@And("I choose country {string}")
377377
public void iChooseCountry(String country) throws Throwable {
378378
//ARRANGE//
@@ -530,7 +530,7 @@ public void iCanSeeRegistrationError() throws Throwable {
530530
String.format(VIEW_ERROR, "Registration error header"));
531531
}
532532

533-
@Step("I can see warning message about missing {0} input")
533+
@Step("I can see warning message about missing *{0}* input")
534534
@Then("I can see warning message about missing {string} input")
535535
public void iCanSeeWarningMessageAboutMissingInput(String stringName) throws Throwable {
536536
switch (stringName.toLowerCase()) {

src/test/java/com/steps/SearchPageSteps.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class SearchPageSteps extends FrameworkEnvironment {
2727
private MainPage mainPage = new MainPage();
2828
private SearchPage searchPage = new SearchPage();
2929

30-
@Step("I search for phrase {0}")
30+
@Step("I search for phrase *{0}*")
3131
@When("I search for phrase {string}")
3232
public void iSearchForPhrase(String searchPhrase) throws Throwable {
3333
//ACT//
@@ -45,7 +45,7 @@ public void iClickOnSearchIcon() throws Throwable {
4545
mainPage.searchBoxSubmit.click();
4646
}
4747

48-
@Step("I can see numbers of results equals to {0}")
48+
@Step("I can see numbers of results equals to *{0}*")
4949
@Then("I can see numbers of results equals to {string}")
5050
public void iCanSeeNumbersOfResultsEqualsTo(String expectedCountOfResults) throws Throwable {
5151
//ARRANGE//
@@ -63,7 +63,7 @@ public void iCanSeeNumbersOfResultsEqualsTo(String expectedCountOfResults) throw
6363
actualCountOfResults, expectedCountOfResults));
6464
}
6565

66-
@Step("I can see that every results which have been found contains phrase {0}")
66+
@Step("I can see that every results which have been found contains phrase *{0}*")
6767
@And("I can see that every results which have been found contains phrase {string}")
6868
public void iCanSeeThatEveryResultsWhichHaveBeenFoundContainsPhrase(String searchPhrase) throws Throwable {
6969
//ARRANGE//
@@ -78,10 +78,13 @@ public void iCanSeeThatEveryResultsWhichHaveBeenFoundContainsPhrase(String searc
7878
Assert.assertTrue(productName.getText().toLowerCase().contains(singlePhrase.toLowerCase()), SEARCH_ERROR);
7979
}
8080
}
81+
82+
} else {
83+
Assert.assertTrue(basePage.isDisplayed(5, searchPage.noResultsWereFoundHeader), VIEW_ERROR);
8184
}
8285
}
8386

84-
@Step("I select from Dropdown Sort by {0}")
87+
@Step("I select from Dropdown Sort by *{0}*")
8588
@Then("I select from Dropdown Sort by {string}")
8689
public void iSelectFromDropdownSortBy(String sortBy) throws Throwable {
8790
//ACT//
@@ -111,7 +114,7 @@ public void iSelectFromDropdownSortBy(String sortBy) throws Throwable {
111114
Assert.assertEquals(searchPage.readSortByDropdown.getText().toLowerCase(), sortBy.toLowerCase(), VALUE_ERROR);
112115
}
113116

114-
@Step("I can see that results are correctly sorted by {0}")
117+
@Step("I can see that results are correctly sorted by *{0}*")
115118
@And("I can see that results are correctly sorted by {string}")
116119
public void iCanSeeThatResultsAreCorrectlySortedBy(String sortedBy) throws Throwable {
117120
//ARRANGE//

src/test/java/com/steps/ShoppingLoggedUserSteps.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public ShoppingLoggedUserSteps(ContextInjection contextInjection) {
3838
this.contextInjection = contextInjection;
3939
}
4040

41-
@Step("I click on {0} button from sub menu")
41+
@Step("I click on *{0}* button from sub menu")
4242
@And("I click on {string} button from sub menu")
4343
public void iClickOnButtonFromSubMenu(String category) throws Throwable {
4444
//ACT//
@@ -65,7 +65,7 @@ public void iClickOnButtonFromSubMenu(String category) throws Throwable {
6565
("\\s+", "").toLowerCase(), category.toLowerCase(), VALUE_ERROR);
6666
}
6767

68-
@Step("I click on following product {0}")
68+
@Step("I click on following product *{0}*")
6969
@And("I click on following product {string}")
7070
public void iClickOnFollowingProduct(String productName) throws Throwable {
7171
//ARRANGE//
@@ -176,13 +176,13 @@ public void iCanSeeModalWhereIAmAbleToSeeDetailedDataAboutMyPurchase() throws Th
176176
$decimalFormat.format(contextInjection.finalOrderTotalPrice), VALUE_ERROR);
177177
}
178178

179-
@Step("I click on Proceed To Checkout button \\(from modal)")
179+
@Step("I click on Proceed To Checkout button (from modal)")
180180
@And("I click on Proceed To Checkout button \\(from modal)")
181181
public void iClickOnProceedToCheckoutButtonFromModal() throws Throwable {
182182
productDetailsPage.proceedToCheckoutButton.click();
183183
}
184184

185-
@Step("I can see Shopping-Cart {0} form with valid information")
185+
@Step("I can see Shopping-Cart *{0}* form with valid information")
186186
@And("I can see Shopping-Cart {string} form with valid information")
187187
public void iCanSeeShoppingCartFormWithValidInformation(String shoppingSummaryTab) throws Throwable {
188188
//ARRANGE//
@@ -270,7 +270,7 @@ public void iCanSeeShoppingCartFormWithValidInformation(String shoppingSummaryTa
270270
}
271271
}
272272

273-
@Step("I click on Proceed To Checkout button \\(from shopping-cart)")
273+
@Step("I click on Proceed To Checkout button (from shopping-cart)")
274274
@And("I click on Proceed To Checkout button \\(from shopping-cart)")
275275
public void iClickOnProceedToCheckoutButtonFromShoppingCart() throws Throwable {
276276
shoppingCartSummaryPage.proceedToCheckoutButton.click();
@@ -290,7 +290,7 @@ public void iWriteCommentAboutMyOrder() throws Throwable {
290290
Assert.assertEquals(shoppingCartSummaryPage.orderComment.getAttribute("value").toLowerCase(), orderComment.toLowerCase(), VALUE_ERROR);
291291
}
292292

293-
@Step("I choose shipping option{0}")
293+
@Step("I choose shipping option *{0}*")
294294
@And("I choose shipping option {string}")
295295
public void iChooseShippingOption(String shippingOption) throws Throwable {
296296
//ACT//

src/test/java/com/steps/SocialMediaPageSteps.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class SocialMediaPageSteps extends DriverFactory {
2222
private BasePage basePage = new BasePage();
2323
private SocialMediaPage socialMediaPage = new SocialMediaPage();
2424

25-
@Step("I scroll the website until I can see {0} logo")
25+
@Step("I scroll the website until I can see *{0}* logo")
2626
@When("I scroll the website until I can see {string} logo")
2727
public void iScrollTheWebsiteUntilICanSeeLogo(String logoName) throws Throwable {
2828
//ACT//
@@ -56,7 +56,7 @@ public void iScrollTheWebsiteUntilICanSeeLogo(String logoName) throws Throwable
5656
}
5757
}
5858

59-
@Step("I click on {0} logo button")
59+
@Step("I click on *{0}* logo button")
6060
@And("I click on {string} logo button")
6161
public void iClickOnLogoButton(String logoName) throws Throwable {
6262
//ACT//
@@ -83,7 +83,7 @@ public void iClickOnLogoButton(String logoName) throws Throwable {
8383
logger.info(String.format("Chosen social media platform: %S", logoName));
8484
}
8585

86-
@Step("I am redirected to Selenium {0} profile")
86+
@Step("I am redirected to Selenium *{0}* profile")
8787
@Then("I am redirected to Selenium {string} profile")
8888
public void iAmRedirectedToSeleniumProfile(String logoName) throws Throwable {
8989
//ARRANGE//

src/test/java/tests/API_Tests.java renamed to src/test/java/tests/API/API_Tests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tests;
1+
package tests.API;
22

33
import com.ExcelEnvironment;
44
import com.listeners.TestNGListener_API;

src/test/java/tests/Authentication_Tests.java renamed to src/test/java/tests/APP/Authentication_Tests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tests;
1+
package tests.APP;
22

33
import com.ContextInjection;
44
import com.ExcelEnvironment;

src/test/java/tests/CustomerService_Tests.java renamed to src/test/java/tests/APP/CustomerService_Tests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tests;
1+
package tests.APP;
22

33
import com.ContextInjection;
44
import com.ExcelEnvironment;

0 commit comments

Comments
 (0)