-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98a9d40
commit 4a3a9de
Showing
2 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ const URLS = { | |
}, | ||
github: "https://github.com/arpitdalal/", | ||
linkedin: "https://linkedin.com/in/arpitdalal/", | ||
twitter: "https://twitter.com/arpitdalal_dev/", | ||
x: "https://x.com/arpitdalal_dev/", | ||
youtube: "https://youtube.com/@arpitdalal_dev/", | ||
mail: "mailto:[email protected]", | ||
xman: "https://xman.arpitdalal.dev/", | ||
|
@@ -93,8 +93,8 @@ function githubHandler(req, res, pathToRemove) { | |
function linkedinHandler(res) { | ||
res.redirect(URLS.linkedin); | ||
} | ||
function twitterHandler(res) { | ||
res.redirect(URLS.twitter); | ||
function xHandler(res) { | ||
res.redirect(URLS.x); | ||
} | ||
function youtubeHandler(res) { | ||
res.redirect(URLS.youtube); | ||
|
@@ -129,10 +129,10 @@ app.get("/linkedin/:path(*)?", (_, res) => { | |
}); | ||
|
||
app.get("/x/:path(*)?", (_, res) => { | ||
twitterHandler(res); | ||
xHandler(res); | ||
}); | ||
app.get("/twitter/:path(*)?", (_, res) => { | ||
twitterHandler(res); | ||
xHandler(res); | ||
}); | ||
|
||
app.get("/yt/:path(*)?", (_, res) => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test('"/twitter" redirects to "twitter.com/arpitdalal_dev" without utm params', async ({ | ||
test('"/twitter" redirects to "x.com/arpitdalal_dev" without utm params', async ({ | ||
page, | ||
}) => { | ||
await page.goto("/twitter"); | ||
|
||
// have to check if the url contains twitter and my username because | ||
// twitter redirects to the login page if the user is not logged in | ||
expect(page.url()).toContain("twitter"); | ||
expect(page.url()).toContain("x"); | ||
expect(page.url()).toContain("arpitdalal_dev"); | ||
}); | ||
test('"/x" redirects to "twitter.com/arpitdalal_dev" without utm params', async ({ | ||
test('"/x" redirects to "x.com/arpitdalal_dev" without utm params', async ({ | ||
page, | ||
}) => { | ||
await page.goto("/x"); | ||
|
||
// have to check if the url contains twitter and my username because | ||
// twitter redirects to the login page if the user is not logged in | ||
expect(page.url()).toContain("twitter"); | ||
expect(page.url()).toContain("x"); | ||
expect(page.url()).toContain("arpitdalal_dev"); | ||
}); |