Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: search automated test (#8706)
Browse files Browse the repository at this point in the history
* Documentation: 

Expanded the docker compose instructions and details

* Update README.md

* Update search.spec.js

Updated automated test in ./tests/search.spec.jstest "After search click profile" to make it functional.

* Update search.spec.js

Fixed duplicate test

* Update tests/search.spec.js

* Update tests/search.spec.js

---------

Co-authored-by: Eddie Jaoude <eddie@jaoudestudios.com>
  • Loading branch information
kbventures and eddiejaoude authored Aug 19, 2023
1 parent 692b465 commit 6f9a258
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions tests/search.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,22 @@ test("Search page shows results after typing 3 characters", async ({
await expect(page.locator("main li")).toContainText(["aka"]);
});

test.fixme("After search click profile", async () => {
// 1. perform search
// 2. click on searched profile
// 3. check profile is displayed
test("After search click profile", async ({ page }) => {
// 1. Perform search
await page.goto("/search");
const input = page.locator("[name='keyword']");
await input.type("eddiejaoude");

// 2. Click on the searched profile
const profileLinkSelector = 'a[href="/eddiejaoude"]';
const profileLink = page.locator(profileLinkSelector);
await profileLink.click();
await page.waitForLoadState("networkidle");

// 3. Check if the profile is displayed
const profileHeader = page.locator("h1");
const profileHeaderText = await profileHeader.innerText();
await expect(profileHeaderText).toContain("Eddie Jaoude");
});

test.fixme(
Expand Down

0 comments on commit 6f9a258

Please sign in to comment.