mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00
style: update graphics (#1138)
* style: update new icon and NavLinks scale * style: new username update * refactor(Dropdown); style: general settings * style(Dropdown); adjust theme * style: dropdown and settings text * fix(Dropdown) system theme not working * style: topbar sticky; fix: general's menu settings transparent with light theme * fix(SubmitButton) stop generate button * fix: user_provided dialog for new dropdown * fix: TS error 'display' * fix(EditPresetDialog): for new dropdown * style: added green send button * converted textchat in tsx * style(SubmitButton): tooltip * test: fixed ThemeSelector and LangSelector * removed transition-opacity * fix all tests * removed empty cn call * chore: Update General.tsx to add Arabic option --------- Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
This commit is contained in:
parent
8b28fdf240
commit
9ad47b6660
43 changed files with 442 additions and 318 deletions
|
@ -30,24 +30,29 @@ test.describe('Navigation suite', () => {
|
|||
const modalClearConvos = await page.getByRole('button', { name: 'Clear' }).isVisible();
|
||||
expect(modalClearConvos).toBeTruthy();
|
||||
|
||||
const modalTheme = page.getByRole('combobox').first();
|
||||
expect(modalTheme.isVisible()).toBeTruthy();
|
||||
const modalTheme = page.getByTestId('theme-selector');
|
||||
expect(modalTheme).toBeTruthy();
|
||||
|
||||
async function changeMode(theme: string) {
|
||||
// change the value to 'dark' and 'light' and see if the theme changes
|
||||
await modalTheme.selectOption({ label: theme });
|
||||
// Ensure Element Visibility:
|
||||
await page.waitForSelector('[data-testid="theme-selector"]');
|
||||
await modalTheme.click();
|
||||
|
||||
await page.click(`[data-theme="${theme}"]`);
|
||||
|
||||
// Wait for the theme change
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
// Check if the HTML element has the theme class
|
||||
const html = await page.$eval(
|
||||
'html',
|
||||
(element, theme) => element.classList.contains(theme.toLowerCase()),
|
||||
(element, selectedTheme) => element.classList.contains(selectedTheme.toLowerCase()),
|
||||
theme,
|
||||
);
|
||||
expect(html).toBeTruthy();
|
||||
}
|
||||
|
||||
await changeMode('Dark');
|
||||
await changeMode('Light');
|
||||
await changeMode('dark');
|
||||
await changeMode('light');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue