feat: add legacy service terms

This commit is contained in:
Codex
2026-07-29 16:23:21 +08:00
parent 8735a88ef6
commit 00bbf193e4
6 changed files with 1330 additions and 0 deletions
+18
View File
@@ -23,6 +23,11 @@ const legalDocuments = [
title: "Auto-Renewal Service Agreement - CozSweet",
marker: "AUTO-RENEWAL SERVICE AGREEMENT",
},
{
path: "../public/service-terms.html",
title: "Terms of Service - elio",
marker: "DESCRIPTION OF SERVICE",
},
{
path: "../public/cozsweet/privacy-policy.html",
title: "Privacy Policy - CozSweet",
@@ -43,6 +48,11 @@ const legalDocuments = [
title: "Auto-Renewal Service Agreement - CozSweet",
marker: "AUTO-RENEWAL SERVICE AGREEMENT",
},
{
path: "../public/cozsweet/service-terms.html",
title: "Terms of Service - elio",
marker: "DESCRIPTION OF SERVICE",
},
];
for (const document of legalDocuments) {
@@ -70,6 +80,7 @@ for (const documentName of [
"data-deletion",
"membership-agreement",
"auto-renewal-agreement",
"service-terms",
]) {
test(`keeps both ${documentName} URLs byte-identical`, async () => {
const rootDocument = await readFile(
@@ -94,6 +105,7 @@ test("exposes all legal documents from the site footer", async () => {
"/cozsweet/data-deletion.html",
"/cozsweet/membership-agreement.html",
"/cozsweet/auto-renewal-agreement.html",
"/cozsweet/service-terms.html",
]) {
assert.ok(source.includes(`href="${href}"`), `Missing footer link: ${href}`);
}
@@ -110,6 +122,7 @@ test("redirects the legacy .html URLs through the worker", async () => {
"data-deletion",
"membership-agreement",
"auto-renewal-agreement",
"service-terms",
]) {
assert.ok(
source.includes(
@@ -118,4 +131,9 @@ test("redirects the legacy .html URLs through the worker", async () => {
`Missing legacy redirect: ${documentName}`,
);
}
assert.ok(
source.includes('"/cozsweet/data-deletion/": "/data-deletion.html"'),
"Missing trailing-slash data deletion redirect",
);
});