fix: disable Google Translate from HTML
This commit is contained in:
@@ -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/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user