mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00

* chore(.gitignore): add auth.json to gitignore test(landing.spec.js): remove commented out code and add check for landing page title test(login.spec.js): add test for login page title feat(package.json): add e2e:auth script to generate auth.json storage file for e2e tests * test(landing.spec.js): add beforeEach hook to create a new browser context with auth.json storage state test(landing.spec.js): change test name from 'landing page' to 'Landing title' fix(package.json): change e2e:auth script to save auth.json in e2e directory
18 lines
496 B
JavaScript
18 lines
496 B
JavaScript
import { expect, test } from '@playwright/test';
|
|
|
|
test.describe('Landing suite', () => {
|
|
let myBrowser;
|
|
|
|
test.beforeEach(async ({ browser }) => {
|
|
myBrowser = await browser.newContext({
|
|
storageState: 'e2e/auth.json',
|
|
});
|
|
});
|
|
|
|
test('Landing title', async () => {
|
|
const page = await myBrowser.newPage();
|
|
await page.goto('http://localhost:3080/');
|
|
const pageTitle = await page.textContent('#landing-title')
|
|
expect(pageTitle.length).toBeGreaterThan(0);
|
|
});
|
|
});
|