Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {Button, ClipboardButton, Dialog, Icon} from '@gravity-ui/uikit';
import {TESTPLANE_CONFIG_BREAK_LINES, TESTPLANE_CONFIG_EXPAND_ALL} from '@/constants';
import {CodeActions} from '@/static/new-ui/components/CodeActions';
import {PanelSection} from '@/static/new-ui/components/PanelSection';
import {useAnalytics} from '@/static/new-ui/hooks/useAnalytics';
import useLocalStorage from '@/static/hooks/useLocalStorage';
import styles from './index.module.css';

Expand Down Expand Up @@ -134,13 +135,17 @@ export function ConfigSection({config, configPath}: ConfigSectionProps): ReactNo
const [areAllNestedExpanded, setAllNestedExpanded] = useLocalStorage(TESTPLANE_CONFIG_EXPAND_ALL, false);
const [isOpen, setIsOpen] = useState(false);
const formattedConfig = JSON.stringify(config, null, 2);
const analytics = useAnalytics();

return <>
<PanelSection
title={'Testplane config'}
description={'Testplane configuration explicitly specified by the user.'}
>
<Button className={'regular-button'} onClick={(): void => setIsOpen(true)} qa={'open-config-button'}>
<Button className={'regular-button'} onClick={(): void => {
setIsOpen(true);
analytics?.trackFeatureUsage({featureName: 'User config'});
}} qa={'open-config-button'}>
<Icon data={FileText}/>Open config
</Button>
</PanelSection>
Expand Down
4 changes: 2 additions & 2 deletions test/func/tests/common/new-ui/theme.testplane.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (process.env.TOOL === 'testplane') {

await closeSettings(browser, settingsMenuItem);

await browser.assertView('dark-theme', 'body');
await browser.assertView('dark-theme', 'body', {ignoreElements: ['[data-qa="tree-view-list"]']});
});

it('should switch to light theme', async ({browser}) => {
Expand All @@ -33,7 +33,7 @@ if (process.env.TOOL === 'testplane') {

await closeSettings(browser, settingsMenuItem);

await browser.assertView('light-theme', 'body');
await browser.assertView('light-theme', 'body', {ignoreElements: ['[data-qa="tree-view-list"]']});
});
});
});
Expand Down
Binary file modified test/func/tests/screens/47a94ad/chrome/dark-theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/func/tests/screens/815b6f8/chrome/light-theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading