perf: Slim down loggedInViewer tRPC router (#20111)
* perf: Slim down loggedInViewer tRPC router * Fixed trpc client calls for new routes * Moved bookingUnconfirmedCount * Moved getUserTopBanners to me router * Moved shouldVerifyEmail to me router * Moved i18n from public to its own router * fix ssrInit * fix ssrInit usage * fix type check * better naming * fix * fix * Fix types * Removed used of importHandler --------- Co-authored-by: hbjORbj <[email protected]>
This commit is contained in:
1 parent
424d94f16d
commit
20d6eb5200
81 files changed
+162
-188
No files matched your search
@@ -14,9 +14,11 @@ test.describe("Forgot password", async () => {
|
||||
|
||||
// Got to reset password flow
|
||||
await page.goto("/auth/forgot-password");
|
||||
await page.waitForSelector("text=Forgot Password?");
|
||||
|
||||
await page.fill('input[name="email"]', `${user.username}@example.com`);
|
||||
await page.press('input[name="email"]', "Enter");
|
||||
await page.waitForLoadState("networkidle");
|
||||
|
||||
// wait for confirm page.
|
||||
await page.waitForSelector("text=Reset link sent");
|
||||
|
||||
@@ -1043,6 +1043,8 @@ export async function login(
|
||||
|
||||
//login
|
||||
await page.goto("/");
|
||||
await page.waitForSelector("text=Welcome back");
|
||||
|
||||
await emailLocator.fill(user.email ?? `${user.username}@example.com`);
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
await passwordLocator.fill(user.password ?? user.username!);
|
||||
|
||||
@@ -19,6 +19,7 @@ test.describe("unauthorized user sees correct translations (de)", async () => {
|
||||
await page.locator("html[dir=ltr]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=Willkommen zurück");
|
||||
const locator = page.getByText("Willkommen zurück", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
@@ -43,6 +44,7 @@ test.describe("unauthorized user sees correct translations (ar)", async () => {
|
||||
await page.locator("html[dir=rtl]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=أهلاً بك من جديد");
|
||||
const locator = page.getByText("أهلاً بك من جديد", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
@@ -67,6 +69,7 @@ test.describe("unauthorized user sees correct translations (zh)", async () => {
|
||||
await page.locator("html[dir=ltr]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=欢迎回来");
|
||||
const locator = page.getByText("欢迎回来", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
@@ -91,6 +94,7 @@ test.describe("unauthorized user sees correct translations (zh-CN)", async () =>
|
||||
await page.locator("html[dir=ltr]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=欢迎回来");
|
||||
const locator = page.getByText("欢迎回来", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
@@ -115,6 +119,7 @@ test.describe("unauthorized user sees correct translations (zh-TW)", async () =>
|
||||
await page.locator("html[dir=ltr]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=歡迎回來");
|
||||
const locator = page.getByText("歡迎回來", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
@@ -139,6 +144,7 @@ test.describe("unauthorized user sees correct translations (pt)", async () => {
|
||||
await page.locator("html[dir=ltr]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=Olá novamente");
|
||||
const locator = page.getByText("Olá novamente", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
@@ -163,6 +169,7 @@ test.describe("unauthorized user sees correct translations (pt-br)", async () =>
|
||||
await page.locator("html[dir=ltr]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=Bem-vindo(a) novamente");
|
||||
const locator = page.getByText("Bem-vindo(a) novamente", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
@@ -188,6 +195,7 @@ test.describe("unauthorized user sees correct translations (es-419)", async () =
|
||||
await page.locator("html[dir=ltr]").waitFor({ state: "attached" });
|
||||
|
||||
{
|
||||
await page.waitForSelector("text=Bienvenido de nuevo");
|
||||
const locator = page.getByText("Bienvenido de nuevo", { exact: true });
|
||||
expect(await locator.count()).toEqual(1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user