mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00
fix(e2e): add support for setting localStorage before navigating to the page due to new Nav behavior (#579)
This commit is contained in:
parent
8e1473c3d8
commit
10c772c9f2
1 changed files with 5 additions and 0 deletions
|
@ -19,6 +19,11 @@ async function authenticate(config: FullConfig, user: User) {
|
|||
await login(page, user);
|
||||
await page.locator('h1:has-text("LibreChat")').waitFor();
|
||||
console.log('🤖: ✔️ user successfully authenticated');
|
||||
// Set localStorage before navigating to the page
|
||||
await page.context().addInitScript(() => {
|
||||
localStorage.setItem('navVisible', 'true');
|
||||
});
|
||||
console.log('🤖: ✔️ localStorage: set Nav as Visible', storageState);
|
||||
await page.context().storageState({path: storageState as string});
|
||||
console.log('🤖: ✔️ authentication state successfully saved in', storageState);
|
||||
await browser.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue