diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 205f1b2af5..4a63c918a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,6 +85,43 @@ jobs: cd ./apps/frontend pnpm unit-test + + test-webdriver-working: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9.1.4 + + - name: Install dependencies + run: | + cd ./apps/frontend + pnpm i + + - name: Install Chrome WebDriver + uses: nanasess/setup-chromedriver@v2 + with: + chromedriver-version: '130.0.6723.116' + + - name: Install Edge + uses: browser-actions/setup-edge@v1 + with: + edge-version: stable + + - name: Install Geckodriver + uses: browser-actions/setup-geckodriver@latest + + + - name: Run Browser Test + run: | + cd ./apps/frontend + pnpm browser-test -- -t "webdriver installed correctly" + test-docker-compose: runs-on: ubuntu-latest diff --git a/apps/frontend/__tests__/browser-tests/browser.test.ts b/apps/frontend/__tests__/browser-tests/browser.test.ts index a3b44024c9..bc19217b25 100644 --- a/apps/frontend/__tests__/browser-tests/browser.test.ts +++ b/apps/frontend/__tests__/browser-tests/browser.test.ts @@ -10,8 +10,11 @@ const ETERNAL_JWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3OD const CHROME_OPTIONS = new ChromeOptions() .addArguments("--headless=new") as ChromeOptions; // uncomment locally to see the steps in action const EDGE_OPTIONS = new EdgeOptions() + .setBinaryPath("/opt/hostedtoolcache/msedge/stable/x64/msedge") .addArguments("--headless=new") as EdgeOptions; + const FIREFOX_OPTIONS = new FirefoxOptions() + .setBinary("/opt/hostedtoolcache/geckodriver/0.35.0/x64/geckodriver") .addArguments("--headless") as FirefoxOptions; const builder = new Builder() @@ -34,7 +37,7 @@ describe.each([Browser.CHROME, Browser.EDGE, Browser.FIREFOX])("%s driver test", await driver.quit(); }) - describe.skip("webdriver installed correctly", () => { + describe("webdriver installed correctly", () => { it("does google search", async () => { await driver.get('http://www.google.com'); await driver.findElement(By.name('q')).sendKeys('webdriver', Key.RETURN);