style: step 2-3 - uniform text tokens in login+main page, fix tsconfig build exclusions

This commit is contained in:
2026-04-19 11:46:44 +03:00
parent 80ec2dc2b0
commit ffb56c030d
4 changed files with 17 additions and 17 deletions

View File

@@ -72,7 +72,7 @@ export async function clickAndWait(
*/
export async function getText(page: Page, selector: string): Promise<string> {
const locator = page.locator(selector);
return locator.textContent() || '';
return (await locator.textContent()) ?? '';
}
/**
@@ -285,7 +285,7 @@ export async function getLocalStorage(page: Page, key: string): Promise<string |
* Set localStorage data
*/
export async function setLocalStorage(page: Page, key: string, value: string): Promise<void> {
await page.evaluate((k, v) => localStorage.setItem(k, v), key, value);
await page.evaluate(({ k, v }: { k: string; v: string }) => localStorage.setItem(k, v), { k: key, v: value });
}
/**
@@ -331,7 +331,7 @@ export async function mockApiResponse(
route.continue();
});
await page.on('route', (route) => {
page.on('route', (route) => {
if (route.request().url().match(urlPattern)) {
route.respond({
status,