feat: add legacy service terms
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
import { redirectToLegalDocument } from "../legalDocumentRedirect";
|
||||||
|
|
||||||
|
export default function ServiceTermsRedirect() {
|
||||||
|
redirectToLegalDocument("service-terms");
|
||||||
|
}
|
||||||
@@ -34,6 +34,7 @@ export function SiteShell({ children }: { children: ReactNode }) {
|
|||||||
<a href="/cozsweet/data-deletion.html">Data Deletion</a>
|
<a href="/cozsweet/data-deletion.html">Data Deletion</a>
|
||||||
<a href="/cozsweet/membership-agreement.html">Membership Agreement</a>
|
<a href="/cozsweet/membership-agreement.html">Membership Agreement</a>
|
||||||
<a href="/cozsweet/auto-renewal-agreement.html">Auto-Renewal Agreement</a>
|
<a href="/cozsweet/auto-renewal-agreement.html">Auto-Renewal Agreement</a>
|
||||||
|
<a href="/cozsweet/service-terms.html">Terms of Service</a>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -23,6 +23,11 @@ const legalDocuments = [
|
|||||||
title: "Auto-Renewal Service Agreement - CozSweet",
|
title: "Auto-Renewal Service Agreement - CozSweet",
|
||||||
marker: "AUTO-RENEWAL SERVICE AGREEMENT",
|
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",
|
path: "../public/cozsweet/privacy-policy.html",
|
||||||
title: "Privacy Policy - CozSweet",
|
title: "Privacy Policy - CozSweet",
|
||||||
@@ -43,6 +48,11 @@ const legalDocuments = [
|
|||||||
title: "Auto-Renewal Service Agreement - CozSweet",
|
title: "Auto-Renewal Service Agreement - CozSweet",
|
||||||
marker: "AUTO-RENEWAL SERVICE AGREEMENT",
|
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) {
|
for (const document of legalDocuments) {
|
||||||
@@ -70,6 +80,7 @@ for (const documentName of [
|
|||||||
"data-deletion",
|
"data-deletion",
|
||||||
"membership-agreement",
|
"membership-agreement",
|
||||||
"auto-renewal-agreement",
|
"auto-renewal-agreement",
|
||||||
|
"service-terms",
|
||||||
]) {
|
]) {
|
||||||
test(`keeps both ${documentName} URLs byte-identical`, async () => {
|
test(`keeps both ${documentName} URLs byte-identical`, async () => {
|
||||||
const rootDocument = await readFile(
|
const rootDocument = await readFile(
|
||||||
@@ -94,6 +105,7 @@ test("exposes all legal documents from the site footer", async () => {
|
|||||||
"/cozsweet/data-deletion.html",
|
"/cozsweet/data-deletion.html",
|
||||||
"/cozsweet/membership-agreement.html",
|
"/cozsweet/membership-agreement.html",
|
||||||
"/cozsweet/auto-renewal-agreement.html",
|
"/cozsweet/auto-renewal-agreement.html",
|
||||||
|
"/cozsweet/service-terms.html",
|
||||||
]) {
|
]) {
|
||||||
assert.ok(source.includes(`href="${href}"`), `Missing footer link: ${href}`);
|
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",
|
"data-deletion",
|
||||||
"membership-agreement",
|
"membership-agreement",
|
||||||
"auto-renewal-agreement",
|
"auto-renewal-agreement",
|
||||||
|
"service-terms",
|
||||||
]) {
|
]) {
|
||||||
assert.ok(
|
assert.ok(
|
||||||
source.includes(
|
source.includes(
|
||||||
@@ -118,4 +131,9 @@ test("redirects the legacy .html URLs through the worker", async () => {
|
|||||||
`Missing legacy redirect: ${documentName}`,
|
`Missing legacy redirect: ${documentName}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert.ok(
|
||||||
|
source.includes('"/cozsweet/data-deletion/": "/data-deletion.html"'),
|
||||||
|
"Missing trailing-slash data deletion redirect",
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ const LEGAL_DOCUMENT_REDIRECTS: Record<string, string> = {
|
|||||||
"/cozsweet/data-deletion.html": "/data-deletion.html",
|
"/cozsweet/data-deletion.html": "/data-deletion.html",
|
||||||
"/cozsweet/membership-agreement.html": "/membership-agreement.html",
|
"/cozsweet/membership-agreement.html": "/membership-agreement.html",
|
||||||
"/cozsweet/auto-renewal-agreement.html": "/auto-renewal-agreement.html",
|
"/cozsweet/auto-renewal-agreement.html": "/auto-renewal-agreement.html",
|
||||||
|
"/cozsweet/service-terms.html": "/service-terms.html",
|
||||||
|
"/cozsweet/privacy-policy/": "/privacy-policy.html",
|
||||||
|
"/cozsweet/data-deletion/": "/data-deletion.html",
|
||||||
|
"/cozsweet/membership-agreement/": "/membership-agreement.html",
|
||||||
|
"/cozsweet/auto-renewal-agreement/": "/auto-renewal-agreement.html",
|
||||||
|
"/cozsweet/service-terms/": "/service-terms.html",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Image security config. SVG sources with .svg extension auto-skip the
|
// Image security config. SVG sources with .svg extension auto-skip the
|
||||||
|
|||||||
Reference in New Issue
Block a user