fix: disable Google Translate from HTML

This commit is contained in:
Benny Joo
2025-04-17 00:10:25 +00:00
committed by GitHub
parent cae8470350
commit 49f0759f31
2 changed files with 7 additions and 4 deletions
+2
View File
@@ -119,6 +119,8 @@ export default async function RootLayout({ children }: { children: React.ReactNo
return (
<html
className="notranslate"
translate="no"
lang={locale}
dir={direction}
style={embedColorScheme ? { colorScheme: embedColorScheme as string } : undefined}
@@ -152,7 +152,7 @@ test.describe("Popup Tests", () => {
}
const html = embedIframe.locator("html");
// Expect "light" theme as configured in App for pro user.
await expect(html).toHaveAttribute("class", "light");
await expect(html).toHaveClass(/light/);
const { uid: bookingId } = await bookFirstEvent("pro", embedIframe, page);
const booking = await getBooking(bookingId);
expect(booking.attendees.length).toBe(3);
@@ -187,7 +187,8 @@ test.describe("Popup Tests", () => {
return window.matchMedia("(prefers-color-scheme: dark)").matches;
});
// Detect browser preference and expect accordingly
await expect(html).toHaveAttribute("class", prefersDarkScheme ? "dark" : "light");
prefersDarkScheme ? await expect(html).toHaveClass(/dark/) : await expect(html).toHaveClass(/light/);
});
test("should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API", async ({
@@ -210,7 +211,7 @@ test.describe("Popup Tests", () => {
}
const html = embedIframe.locator("html");
await expect(html).toHaveAttribute("class", "dark");
await expect(html).toHaveClass(/dark/);
});
test("should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API", async ({
@@ -233,7 +234,7 @@ test.describe("Popup Tests", () => {
}
const html = embedIframe.locator("html");
await expect(html).toHaveAttribute("class", "dark");
await expect(html).toHaveClass(/dark/);
});
});
});