Skip to content

Commit 73d795b

Browse files
author
Kamil Nowocin
committed
feat: Travis-CI formatting fix #vol 2.0
1 parent c68da59 commit 73d795b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/test/java/com/FrameworkEnvironment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.nio.file.Path;
2525
import java.nio.file.Paths;
2626
import java.text.DecimalFormat;
27+
import java.text.DecimalFormatSymbols;
2728
import java.text.SimpleDateFormat;
2829
import java.util.Date;
2930
import java.util.Locale;
@@ -42,7 +43,7 @@ public class FrameworkEnvironment {
4243
protected static Logger logger = LoggerFactory.getLogger(Hooks.class);
4344
protected static Faker faker = new Faker(new Locale("en-US"));
4445
protected static MockNeat mockNeat = MockNeat.threadLocal();
45-
protected static DecimalFormat $decimalFormat = new DecimalFormat("$#0.00");
46+
protected static DecimalFormat $decimalFormat = new DecimalFormat("$#0.00", new DecimalFormatSymbols(Locale.US));
4647

4748
//BUNDLES//
4849
protected static final ResourceBundle resourceBundleInvalidEmails = ResourceBundle.getBundle("invalidEmails");

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ public void iCanSeeModalWhereIAmAbleToSeeDetailedDataAboutMyPurchase() throws Th
169169

170170
Assert.assertEquals(productDetailsPage.popupPaneFinalProductTotalPrice.getText()
171171
.replaceAll("[^$0-9.]", ""),
172-
$decimalFormat.format(contextInjection.finalProductTotalPrice).replace(",", "."), VALUE_ERROR);
172+
$decimalFormat.format(contextInjection.finalProductTotalPrice), VALUE_ERROR);
173173

174174
Assert.assertEquals(productDetailsPage.popupPaneFinalOrderTotalPrice.getText()
175175
.replaceAll("[^$0-9.]", ""),
176-
$decimalFormat.format(contextInjection.finalOrderTotalPrice).replace(",", "."), VALUE_ERROR);
176+
$decimalFormat.format(contextInjection.finalOrderTotalPrice), VALUE_ERROR);
177177
}
178178

179179
@Step("I click on Proceed To Checkout button \\(from modal)")
@@ -208,7 +208,7 @@ public void iCanSeeShoppingCartFormWithValidInformation(String shoppingSummaryTa
208208
Assert.assertEquals(Double.parseDouble(shoppingCartSummaryPage.productQuantity.getAttribute
209209
("value").toLowerCase()), contextInjection.productQuantity, VALUE_ERROR);
210210
Assert.assertEquals(shoppingCartSummaryPage.productTotalPrice.getText()
211-
.replaceAll("[^$0-9.]", "").replace(".", ","),
211+
.replaceAll("[^$0-9.]", ""),
212212
$decimalFormat.format(contextInjection.finalProductTotalPrice), VALUE_ERROR);
213213
//TODO - how tax is calculated in america?
214214
//Assert.assertEquals(shoppingCartSummaryPage.productTotalOrderPriceTAX.getText()

0 commit comments

Comments
 (0)