Skip to content

Commit

Permalink
Merge pull request #106 from debatecore/105-fix-the-about-footer-link
Browse files Browse the repository at this point in the history
[105] fix the "about" footer link
  • Loading branch information
jakubmanczak authored Aug 27, 2024
2 parents cafee16 + 50801b1 commit db79473
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DebatecoreFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const DebatecoreFooter = (props: {}) => {
const footerlinks: footerlink[] = [
{
text: useLang("footerAbout"),
href: "/about",
href: "https://debateco.re/about",
},
{
text: `${useLang("footerLicense")} (AGPLv3)`,
Expand Down
31 changes: 31 additions & 0 deletions tests/e2e/footer-links.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { test, expect } from "@playwright/test";

test("debatecore homepage", async ({ page }) => {
await page.goto("http://localhost:3000");
await page.getByRole("link", { name: "debatecore" }).click();
await expect(page).toHaveTitle(/.*debatecore.*/);
await expect(page).toHaveURL("https://debateco.re");
});

test("about page", async ({ page }) => {
await page.goto("http://localhost:3000");
await page.getByRole("link", { name: "About" }).click();
await expect(page).toHaveTitle(/.*debatecore.*/);
await expect(page).toHaveURL("https://debateco.re/about");
});

test("license page", async ({ page }) => {
await page.goto("http://localhost:3000");
await page.getByRole("link", { name: "License (AGPLv3)" }).click();
await expect(page).toHaveTitle(/.*debate-tools\/LICENSE.*/);
await expect(page).toHaveURL(
"https://github.com/debatecore/debate-tools/blob/master/LICENSE"
);
});

test("debate tools repo", async ({ page }) => {
await page.goto("http://localhost:3000");
await page.getByRole("link", { name: "Source code" }).click();
await expect(page).toHaveTitle(/.*debatecore\/debate-tools.*/);
await expect(page).toHaveURL("https://github.com/debatecore/debate-tools");
});

0 comments on commit db79473

Please sign in to comment.