Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- pom.xml -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
Expand All @@ -82,6 +83,7 @@
<artifactId>webdrivermanager</artifactId>
<version>3.7.1</version>
</dependency>

</dependencies>
<build>
<finalName>calculator</finalName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import javax.inject.Named;


import tech.zerofiltre.testing.calcul.domain.Calculator;
import tech.zerofiltre.testing.calcul.domain.model.CalculationModel;
import tech.zerofiltre.testing.calcul.domain.model.CalculationType;

@Named

public class CalculatorServiceImpl implements CalculatorService {

private final Calculator calculator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public class SolutionFormatterImpl implements SolutionFormatter {

@Override
public String format(int solution) {
return String.format(Locale.FRENCH, "%,d", solution);
return String.format(Locale.GERMAN, "%,d", solution);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
Expand All @@ -19,7 +19,7 @@
import org.springframework.boot.web.server.LocalServerPort;

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class MultiplicationJourneyE2ETest {
class MultiplicationJourneyE2E {

@LocalServerPort
private int port;
Expand Down Expand Up @@ -47,7 +47,7 @@ void quitWebDriver() {
}

@Test
void multiplyTwoBySixteenMustReturn32(){
void multiplyTwoBySixteenMustReturn32() {

//GIVEN
webDriver.get(baseUrl);
Expand All @@ -63,11 +63,11 @@ void multiplyTwoBySixteenMustReturn32(){
submitButton.click();

//THEN
WebDriverWait waiter = new WebDriverWait(webDriver,5);
WebDriverWait waiter = new WebDriverWait(webDriver, 5);
WebElement solutionElement = waiter.until(ExpectedConditions.presenceOfElementLocated(By.id("solution")));
String solution = solutionElement.getText();
assertThat(solution).isEqualTo("32");
}


}
}