13 lines
362 B
TypeScript
13 lines
362 B
TypeScript
|
|
import { Page } from "@playwright/test";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Set language to English for e2e tests.
|
||
|
|
* E2E tests should only test in English according to requirements.
|
||
|
|
* Call this in beforeEach hooks in test files.
|
||
|
|
*/
|
||
|
|
export async function setEnglishLanguage(page: Page) {
|
||
|
|
await page.addInitScript(() => {
|
||
|
|
window.localStorage.setItem("arbret-locale", "en");
|
||
|
|
});
|
||
|
|
}
|