test(e2e): update specs for multi-character routes
This commit is contained in:
@@ -8,6 +8,13 @@ export const e2eEmailCredentials = {
|
||||
};
|
||||
|
||||
export const splashStartChatButtonName = "Start Chatting";
|
||||
export const defaultCharacterSlug = "elio";
|
||||
export const defaultCharacterSplashPath = `/characters/${defaultCharacterSlug}/splash`;
|
||||
export const defaultCharacterChatPath = `/characters/${defaultCharacterSlug}/chat`;
|
||||
export const defaultCharacterSidebarPath = `/characters/${defaultCharacterSlug}/sidebar`;
|
||||
export const defaultCharacterChatUrl = new RegExp(
|
||||
`/characters/${defaultCharacterSlug}/chat(?:\\?.*)?$`,
|
||||
);
|
||||
|
||||
export function getSplashStartChatButton(page: Page) {
|
||||
return page.getByRole("button", { name: splashStartChatButtonName });
|
||||
@@ -24,8 +31,9 @@ export async function setEmailSessionStorage(page: Page) {
|
||||
}
|
||||
|
||||
export async function seedEmailSession(page: Page) {
|
||||
await page.goto("/splash");
|
||||
await page.goto(defaultCharacterSplashPath);
|
||||
await setEmailSessionStorage(page);
|
||||
await page.reload();
|
||||
}
|
||||
|
||||
export async function switchToEmailSignIn(page: Page) {
|
||||
|
||||
Reference in New Issue
Block a user