Skip to content

Commit

Permalink
Test unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelayori committed Mar 18, 2024
1 parent 74e2218 commit ca48a05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/unit-tests-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Install Firefox
run: |
sudo apt-get update
sudo apt-get install -y firefox
- name: Add exec permission to mvnw
run: chmod +x mvnw
- name: Run all tests with sonar analysis
Expand Down
6 changes: 5 additions & 1 deletion src/test/java/com/uniovi/Wiq_IntegrationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
Expand All @@ -19,10 +20,13 @@ class Wiq_IntegrationTests {

static WebDriver driver;


@BeforeAll
static public void begin() {
WebDriverManager.firefoxdriver().setup();
driver = new FirefoxDriver();
FirefoxOptions options = new FirefoxOptions();
options.addArguments("--headless"); // Run Firefox in headless mode
driver = new FirefoxDriver(options);
driver.navigate().to(URL);
}

Expand Down

0 comments on commit ca48a05

Please sign in to comment.