Skip to content

Commit

Permalink
fix social media navigation, and update tests (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
Megha-Dev-19 authored Jun 24, 2024
1 parent 1dec86d commit b3024c2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
6 changes: 6 additions & 0 deletions apps/new/widget/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@ const Footer = () => {
<p>Dive deeper BuildDAO</p>
<SocialIcons>
<Button
noLink={true}
type="icon"
style={{
borderRadius: "30%",
}}
target="_blank"
href="https://x.com/NearBuilders"
>
<svg
Expand All @@ -194,7 +196,9 @@ const Footer = () => {
</svg>
</Button>
<Button
noLink={true}
type="icon"
target="_blank"
style={{
borderRadius: "30%",
}}
Expand All @@ -217,6 +221,8 @@ const Footer = () => {
</svg>
</Button>
<Button
noLink={true}
target="_blank"
type="icon"
style={{
borderRadius: "30%",
Expand Down
29 changes: 14 additions & 15 deletions playwright-tests/tests/landing-page.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,24 @@ test.describe("User is logged in", () => {
});

test("Twitter redirection", async ({ page }) => {
const twitterButton = page.locator("button[type=icon]").nth(3);
await page.waitForTimeout(2000);
await expect(twitterButton).toBeVisible();
await twitterButton.click();
expect(page.url()).toContain("twitter");
const popupPromise = page.waitForEvent("popup");
await page.locator("button[type=icon]").nth(3).click();
const popup = await popupPromise;
await popup.goto("https://x.com/NearBuilders");
});

test("Telegram redirection", async ({ page }) => {
const telegramButton = page.locator("button[type=icon]").nth(4);
await page.waitForTimeout(2000);
await expect(telegramButton).toBeVisible();
await telegramButton.click();
expect(page.url()).toBe("https://www.nearbuilders.com/tg-builders");
const popupPromise = page.waitForEvent("popup");
await page.locator("button[type=icon]").nth(4).click();
const popup = await popupPromise;
await popup.goto("https://www.nearbuilders.com/tg-builders");
});

test("Github redirection", async ({ page }) => {
const githubButton = page.locator("button[type=icon]").nth(5);
await page.waitForTimeout(2000);
await expect(githubButton).toBeVisible();
await githubButton.click();
expect(page.url()).toBe("https://github.com/NEARBuilders");
const popupPromise = page.waitForEvent("popup");
await page.locator("button[type=icon]").nth(5).click();
const popup = await popupPromise;
await popup.goto("https://github.com/NEARBuilders");
});
});

Expand Down

0 comments on commit b3024c2

Please sign in to comment.