diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7eddff47..5e96b12dab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ The types of changes are: ## [Unreleased](https://github.com/ethyca/fides/compare/2.13.0...main) +### Added + +- Add an automated test to check for `/fides-consent.js` backwards compatibility [#3289](https://github.com/ethyca/fides/pull/3289) + ## [2.13.0](https://github.com/ethyca/fides/compare/2.12.1...2.13.0) ### Added diff --git a/clients/privacy-center/cypress/e2e/fides-js.cy.ts b/clients/privacy-center/cypress/e2e/fides-js.cy.ts index 193ccac918..241c9b623a 100644 --- a/clients/privacy-center/cypress/e2e/fides-js.cy.ts +++ b/clients/privacy-center/cypress/e2e/fides-js.cy.ts @@ -27,6 +27,20 @@ describe("fides.js API route", () => { }); }); + it("supports /fides-consent.js route for backwards-compatibility", () => { + cy.request("/fides-consent.js").then((legacyResponse) => { + expect(legacyResponse.status).to.eq(200); + expect(legacyResponse) + .to.have.property("headers") + .to.have.property("content-type") + .to.eql("application/javascript"); + + cy.request("/fides.js").then((standardResponse) => { + expect(standardResponse.body).equals(legacyResponse.body); + }); + }); + }); + describe("when pre-fetching location", () => { it("returns location if provided as a '?location' query param", () => { cy.request("/fides.js?location=US-CA").then((response) => {