Skip to content

Commit

Permalink
chore(e2e): privacy-policy (#671)
Browse files Browse the repository at this point in the history
* add Protection section test

* add Titles check

* add side menu clickable check

* added test ids
  • Loading branch information
TenzingSh committed Jun 26, 2023
1 parent 987eee7 commit b17a04d
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 14 deletions.
28 changes: 14 additions & 14 deletions content/privacy-policy/privacy-policy.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ subtitle: Privacy Policy
description: Privacy Policy
---

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="introduction" title="Introduction">1. Introduction</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="introduction" data-testid="introduction" title="Introduction">1. Introduction</h2>
<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
<p>
DEFICHAIN FOUNDATION LTD. (Company Number: 2068902) takes the privacy of your information seriously. This Privacy Policy applies to the defichain.com website (the “Website”) and governs data collection, processing and usage in compliance with the Data Protection Act, 2021 of the British Virgin Islands (“DPA”).
Expand All @@ -18,7 +18,7 @@ This Privacy Policy has been compiled to better serve those who are concerned wi

</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl lg:text-[32px] lg:leading-10" id="information-collected" title="Information collected from all visitors to our website or webapp">2. Information collected from all visitors to our website or webapp</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl lg:text-[32px] lg:leading-10" id="information-collected" data-testid="information-collected" title="Information collected from all visitors to our website or webapp">2. Information collected from all visitors to our website or webapp</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
<p>
Expand All @@ -33,13 +33,13 @@ This information is used by DEFICHAIN FOUNDATION LTD. for the operation of the s
</p>
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="when-information-collected" title="When is information collected?">3. When is information collected?</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="when-information-collected" data-testid="when-information-collected" title="When is information collected?">3. When is information collected?</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
We collect information from you when you subscribe to a newsletter, respond to a survey, fill out a form or enter information on our site.
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="use-of-information" title="Use of information and details">4. Use of information and details</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="use-of-information" data-testid="use-of-information" title="Use of information and details">4. Use of information and details</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
<p>
Expand All @@ -54,7 +54,7 @@ We may use the information we collect from you when you sign up for our newslett
</ul>
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="security" title="Security of your personal information">5. Security of your personal information</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="security" data-testid="security" title="Security of your personal information">5. Security of your personal information</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
<p>
Expand All @@ -66,7 +66,7 @@ Aside from using regular Malware Scanning, your personal information is containe
</p>
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="cookies" title="Do you use Cookies?">6. Do you use Cookies?</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="cookies" data-testid="cookies" title="Do you use Cookies?">6. Do you use Cookies?</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
<p>
Expand All @@ -92,19 +92,19 @@ If you disable cookies off, some features will be disabled and some of our servi
</p>
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="third-party" title="Third party disclosure">7. Third party disclosure</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="third-party" data-testid="third-party" title="Third party disclosure">7. Third party disclosure</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information unless we provide you with advance notice. This does not include website hosting partners and other parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others’ rights, property, or safety. However, non-personally identifiable visitor information may be provided to other parties for marketing, advertising, or other uses.
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="links" title="Links to other websites">8. Links to other websites</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="links" data-testid="links" title="Links to other websites">8. Links to other websites</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
Our Website may contain links to other websites. This Privacy Policy only applies to this website so when you link to other websites you should read their own privacy policies.
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="google" title="Google">9. Google</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="google" data-testid="google" title="Google">9. Google</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
<p>
Expand Down Expand Up @@ -151,19 +151,19 @@ Users are able to change their personal information:
</p>
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="do-not-track" title="“Do Not Track” signals">10. “Do Not Track” signals</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="do-not-track" data-testid="do-not-track" title="“Do Not Track” signals">10. “Do Not Track” signals</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
We don’t honor “do not track signals” and do not track, plant cookies, or use advertising when a “Do Not Track” (DNT) browser mechanism is in place. We don’t honor them because we do not use that information.
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="third-party-tracking" title="Third party behavioural tracking">11. Third party behavioural tracking</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="third-party-tracking" data-testid="third-party-tracking" title="Third party behavioural tracking">11. Third party behavioural tracking</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
It’s also important to note that we do not allow third party behavioral tracking.
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="access-personal-information" title="Access to, updating, and non-use of your personal information">12. Access to, updating, and non-use of your personal information</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="access-personal-information" data-testid="access-personal-information" title="Access to, updating, and non-use of your personal information">12. Access to, updating, and non-use of your personal information</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
<p>
Expand All @@ -176,13 +176,13 @@ You have the right to ask us not to collect, use, process, or disclose your Pers

</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="statement" title="Changes to this statement">13. Changes to this statement</h2>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="statement" data-testid="statement" title="Changes to this statement">13. Changes to this statement</h2>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pb-6 pt-2 md:pb-8 lg:pb-12 lg:pt-4">
Cake Pte Ltd will occasionally update this Privacy Policy to reflect customer feedback. DEFICHAIN FOUNDATION LTD. encourages you to periodically review this Privacy Policy to be informed of how DEFICHAIN FOUNDATION LTD. is protecting your information.
</div>

<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="contact-information" title="Contact information">14. Contact information</div>
<h2 className="text-dark-1000 scroll-mt-40 text-2xl mb-2 lg:text-[32px] lg:leading-10 lg:mb-4" id="contact-information" data-testid="contact-information" title="Contact information">14. Contact information</div>

<div className="text-dark-800 font-desc leading-8 text-base lg:text-xl pt-2 lg:pt-4">
DEFICHAIN FOUNDATION LTD. welcomes your comments regarding this Privacy Policy. If you believe that defichain.com has not adhered to this Privacy Policy, please <a className="text-electric no-underline" href="mailto:partners@defichain.com">contact us</a> at support.</div>
47 changes: 47 additions & 0 deletions cypress/e2e/explore/privacy.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { viewports } from "../../fixture/main.config";
import { titles } from "../../fixture/privacy.config";

viewports.forEach((viewport) => {
context(`/privacy-policy on ${viewport}`, () => {
beforeEach(() => {
cy.visit("/privacy-policy");
cy.viewport(<Cypress.ViewportPreset>viewport);
});

it("should have Protection section visible", () => {
cy.checkElementVisibilityAndText(
"section-title-privacy-policy-protecting",
"PROTECTING YOUR PRIVACY"
);
cy.checkElementVisibilityAndText(
"section-header-privacy-policy-protecting",
"Privacy Policy"
);
cy.checkElementVisibilityAndText(
"section-desc-privacy-policy-protecting",
"Discover our commitment to protecting your privacy through our strict privacy policy"
);
});

it("should have all the expected Titles visible expected text", () => {
titles.forEach((privacyTitle) => {
cy.findByTestId(privacyTitle.id)
.scrollIntoView()
.should("be.visible")
.and("include.text", privacyTitle.title);
});
});

it("should be able to navigate on side menu", () => {
if (viewport === "macbook-16") {
titles.forEach((privacyTitle) => {
cy.findByTestId(privacyTitle.id).click();
cy.checkElementVisibilityAndHref(
`link-${privacyTitle.id}`,
`#${privacyTitle.id}`
);
});
}
});
});
});
60 changes: 60 additions & 0 deletions cypress/fixture/privacy.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/* eslint-disable import/prefer-default-export */
export const titles = [
{
id: "introduction",
title: "1. Introduction",
},
{
id: "information-collected",
title:
"2. Information collected from all visitors to our website or webapp",
},
{
id: "when-information-collected",
title: "3. When is information collected?",
},
{
id: "use-of-information",
title: "4. Use of information and details",
},
{
id: "security",
title: "5. Security of your personal information",
},
{
id: "cookies",
title: "6. Do you use Cookies?",
},
{
id: "third-party",
title: "7. Third party disclosure",
},
{
id: "links",
title: "8. Links to other websites",
},
{
id: "google",
title: "9. Google",
},
{
id: "do-not-track",
title: "10. “Do Not Track” signals",
},
{
id: "third-party-tracking",
title: "11. Third party behavioural tracking",
},
{
id: "access-personal-information",
title: "12. Access to, updating, and non-use of your personal information",
},
{
id: "statement",
title: "13. Changes to this statement",
},
{
id: "contact-information",
title: "14. Contact information",
},
];
1 change: 1 addition & 0 deletions src/pages/privacy-policy/_components/TableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function Headings({ headings, activeId, parentReference }) {
>
<a
href={`#${heading.id}`}
data-testid={`link-${heading.id}`}
className={classnames(
"font-sans font-semibold text-[18px] leading-6 text-dark-500",
{
Expand Down

0 comments on commit b17a04d

Please sign in to comment.