diff --git a/src/lib/data/index.ts b/src/lib/data/index.ts index 42a0af4f863..a5afe5c062b 100644 --- a/src/lib/data/index.ts +++ b/src/lib/data/index.ts @@ -193,12 +193,6 @@ export const getTranslationGlossary = createCachedGetter( CACHE_REVALIDATE_DAY ) -export const getGitHubContributors = createCachedGetter( - dataLayer.getGitHubContributors, - ["github-contributors"], - CACHE_REVALIDATE_DAY -) - export const getVideoThumbnails = createCachedGetter( dataLayer.getVideoThumbnails, ["video-thumbnails"], diff --git a/src/lib/utils/contributors.ts b/src/lib/utils/contributors.ts index f28b8ffd914..da6ce833c18 100644 --- a/src/lib/utils/contributors.ts +++ b/src/lib/utils/contributors.ts @@ -13,7 +13,7 @@ import { import { getAppPageLastCommitDate } from "./gh" import { getLocaleTimestamp } from "./time" -import { getGitHubContributors, getStaticGitHubContributors } from "@/lib/data" +import { getStaticGitHubContributors } from "@/lib/data" /** Sort team members to the end, preserving relative order within each group. */ const sortTeamToEnd = (contributors: FileContributor[]): FileContributor[] => @@ -54,7 +54,7 @@ export const getAppPageContributorInfo = async ( ) => { // TODO: Incorporate Crowdin contributor information - const contributorsData = await getGitHubContributors() + const contributorsData = await getStaticGitHubContributors() const gitHubContributors = contributorsData?.appPages[pagePath] ?? [] const uniqueGitHubContributors = gitHubContributors.filter( diff --git a/tests/e2e/tutorials.spec.ts b/tests/e2e/tutorials.spec.ts new file mode 100644 index 00000000000..b2bb6788bb0 --- /dev/null +++ b/tests/e2e/tutorials.spec.ts @@ -0,0 +1,20 @@ +import { expect, test } from "@playwright/test" + +import externalTutorials from "@/data/externalTutorials.json" +import internalTutorialSlugs from "@/data/internalTutorials.json" + +const PAGE_URL = "/developers/tutorials/" + +test.describe("Tutorials Listing Page", () => { + test("lists both internal and external tutorials", async ({ page }) => { + await page.goto(PAGE_URL) + + const internalSlug = internalTutorialSlugs[0] + await expect( + page.locator(`a[href*="/developers/tutorials/${internalSlug}"]`).first() + ).toBeVisible() + + const externalUrl = externalTutorials.find((t) => t.lang === "en")!.url + await expect(page.locator(`a[href="${externalUrl}"]`).first()).toBeVisible() + }) +})