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 c784496 commit f58f035
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jobs:
- name: Install dependencies
run: |
cd ./apps/frontend
pnpm i -D
pnpm i
- name: Install Chrome WebDriver
uses: nanasess/setup-chromedriver@v2
Expand Down
9 changes: 7 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; // uncomment locally to see the steps in action
// .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 @@ -32,7 +32,7 @@ describe("chrome browser", () => {
});

describe("browser-test", () => {
it.skip("accesses and login to peerprep", async () => {
it("accesses and login to peerprep", async () => {
await driver.get(URL);
await driver.wait(until.urlIs(`${URL}login`));

Expand All @@ -44,6 +44,11 @@ describe("chrome browser", () => {

await submit.click();
await driver.wait(until.urlIs(`${URL}`));

const slogan1 = await driver.findElement(By.xpath("/html/body/div[1]/main/div/div[1]/div[2]/span[1]")).then(ele => ele.getText())
const slogan2 = await driver.findElement(By.xpath("/html/body/div[1]/main/div/div[1]/div[2]/span[2]")).then(ele => ele.getText())

expect(slogan1 + slogan2).toBe("A better way to prepare for coding interviews withpeers");
});
})
})
Expand Down

0 comments on commit f58f035

Please sign in to comment.