diff --git a/public/images/google-datastudio.png b/public/images/google-datastudio.png deleted file mode 100644 index 11c0654ce..000000000 Binary files a/public/images/google-datastudio.png and /dev/null differ diff --git a/public/images/google-lookerstudio.png b/public/images/google-lookerstudio.png new file mode 100644 index 000000000..21fd94779 Binary files /dev/null and b/public/images/google-lookerstudio.png differ diff --git a/shared/editor/embeds/GoogleDataStudio.test.ts b/shared/editor/embeds/GoogleDataStudio.test.ts deleted file mode 100644 index c190ad573..000000000 --- a/shared/editor/embeds/GoogleDataStudio.test.ts +++ /dev/null @@ -1,29 +0,0 @@ -import GoogleDataStudio from "./GoogleDataStudio"; - -describe("GoogleDataStudio", () => { - const match = GoogleDataStudio.ENABLED[0]; - - test("to be enabled on share link", () => { - expect( - "https://datastudio.google.com/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match( - match - ) - ).toBeTruthy(); - }); - - test("to not be enabled elsewhere", () => { - expect("https://datastudio.google.com/u/0/".match(match)).toBe(null); - expect("https://datastudio.google.com".match(match)).toBe(null); - expect("https://www.google.com".match(match)).toBe(null); - expect( - "https://datastudioogoogle.com/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match( - match - ) - ).toBe(null); - expect( - "https://datastudio.googleecom/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match( - match - ) - ).toBe(null); - }); -}); diff --git a/shared/editor/embeds/GoogleLookerStudio.test.ts b/shared/editor/embeds/GoogleLookerStudio.test.ts new file mode 100644 index 000000000..0e8709756 --- /dev/null +++ b/shared/editor/embeds/GoogleLookerStudio.test.ts @@ -0,0 +1,34 @@ +import GoogleLookerStudio from "./GoogleLookerStudio"; + +describe("GoogleLookerStudio", () => { + const match = GoogleLookerStudio.ENABLED[0]; + + test("to be enabled on share link", () => { + expect( + "https://lookerstudio.google.com/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match( + match + ) + ).toBeTruthy(); + expect( + "https://datastudio.google.com/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match( + match + ) + ).toBeTruthy(); + }); + + test("to not be enabled elsewhere", () => { + expect("https://lookerstudio.google.com/u/0/".match(match)).toBe(null); + expect("https://lookerstudio.google.com".match(match)).toBe(null); + expect("https://www.google.com".match(match)).toBe(null); + expect( + "https://lookerstudioogoogle.com/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match( + match + ) + ).toBe(null); + expect( + "https://lookerstudio.googleecom/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match( + match + ) + ).toBe(null); + }); +}); diff --git a/shared/editor/embeds/GoogleDataStudio.tsx b/shared/editor/embeds/GoogleLookerStudio.tsx similarity index 56% rename from shared/editor/embeds/GoogleDataStudio.tsx rename to shared/editor/embeds/GoogleLookerStudio.tsx index d5816095b..4f9f60c4f 100644 --- a/shared/editor/embeds/GoogleDataStudio.tsx +++ b/shared/editor/embeds/GoogleLookerStudio.tsx @@ -3,30 +3,30 @@ import Frame from "../components/Frame"; import Image from "../components/Image"; import { EmbedProps as Props } from "."; -function GoogleDataStudio(props: Props) { +function GoogleLookerStudio(props: Props) { return ( } canonicalUrl={props.attrs.href} - title="Google Data Studio" + title="Google Looker Studio" border /> ); } -GoogleDataStudio.ENABLED = [ +GoogleLookerStudio.ENABLED = [ new RegExp( - "^https?://datastudio\\.google\\.com/(embed|u/0)/reporting/(.*)/page/(.*)(/edit)?$" + "^https?://(lookerstudio|datastudio)\\.google\\.com/(embed|u/0)/reporting/(.*)/page/(.*)(/edit)?$" ), ]; -export default GoogleDataStudio; +export default GoogleLookerStudio; diff --git a/shared/editor/embeds/index.tsx b/shared/editor/embeds/index.tsx index 88db748c1..c24fb230c 100644 --- a/shared/editor/embeds/index.tsx +++ b/shared/editor/embeds/index.tsx @@ -20,11 +20,11 @@ import Framer from "./Framer"; import Gist from "./Gist"; import Gliffy from "./Gliffy"; import GoogleCalendar from "./GoogleCalendar"; -import GoogleDataStudio from "./GoogleDataStudio"; import GoogleDocs from "./GoogleDocs"; import GoogleDrawings from "./GoogleDrawings"; import GoogleDrive from "./GoogleDrive"; import GoogleForms from "./GoogleForms"; +import GoogleLookerStudio from "./GoogleLookerStudio"; import GoogleSheets from "./GoogleSheets"; import GoogleSlides from "./GoogleSlides"; import Grist from "./Grist"; @@ -248,10 +248,12 @@ const embeds: EmbedDescriptor[] = [ component: GoogleCalendar, }), new EmbedDescriptor({ - title: "Google Data Studio", + title: "Google Looker Studio", keywords: "bi business intelligence", - icon: Google Data Studio, - component: GoogleDataStudio, + icon: ( + Google Looker Studio + ), + component: GoogleLookerStudio, }), new EmbedDescriptor({ title: "Google Forms",