Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
chiaryan committed Nov 10, 2024
1 parent f1e7e40 commit 45ebeb4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Run tests
run: |
cd ./apps/frontend
pnpm test -- ./__tests__/browser-tests
pnpm test -- ./__tests__/browser-tests -t "chrome webdriver installed correctly"
Expand Down Expand Up @@ -253,3 +253,13 @@ jobs:
echo "WebSocket for Signalling Service is live"
fi
# We can add more tests here
- Name: Install Chrome WebDriver
uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: '130.0.6723.116'

- name: Run Browser Test
run: |
cd ./apps/frontend
pnpm test -- ./__tests__/browser-tests
4 changes: 2 additions & 2 deletions apps/frontend/__tests__/browser-tests/browser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const ETERNAL_JWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3OD

describe("chrome browser", () => {
const options = new Chrome.Options()
.addArguments("--headless=new") as Chrome.Options;
.addArguments("--headless=new") as Chrome.Options; // uncomment locally to see the steps in action
const builder = new Builder().forBrowser(Browser.CHROME).setChromeOptions(options);
let driver: WebDriver;

Expand All @@ -18,7 +18,7 @@ describe("chrome browser", () => {
await driver.quit();
})

describe.skip("chrome webdriver installed correctly", () => {
describe("chrome 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);
Expand Down

0 comments on commit 45ebeb4

Please sign in to comment.