Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/lib/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/contributors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =>
Expand Down Expand Up @@ -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(
Expand Down
20 changes: 20 additions & 0 deletions tests/e2e/tutorials.spec.ts
Original file line number Diff line number Diff line change
@@ -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()
})
})
Loading