import { beforeMount } from "@playwright/experimental-ct-vue/hooks"; import Buefy from "buefy"; import "bulma/css/bulma.min.css"; import "buefy/dist/css/buefy.css"; import i18n from "@/i18n"; type PlenoHooksConfig = { locale?: string; }; beforeMount(({ app, hooksConfig }) => { const config = (hooksConfig || {}) as PlenoHooksConfig; const locale = config.locale || "en"; const globalLocale = i18n.global.locale as unknown; if (globalLocale && typeof globalLocale === "object" && "value" in globalLocale) { (globalLocale as { value: string }).value = locale; } else { (i18n.global as unknown as { locale: string }).locale = locale; } app.use(i18n); app.use(Buefy); });