mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 02:09:04 +08:00
chore: helpers required for dashboards e2e test cases (#5496)
* chore: helpers required for dashboards e2e test cases * chore: helpers required for dashboards e2e test cases * chore: helpers required for dashboards e2e test cases
This commit is contained in:
parent
840d8b2e49
commit
43e73e06fe
@ -234,6 +234,7 @@ function WidgetHeader({
|
|||||||
)}
|
)}
|
||||||
<Dropdown menu={menu} trigger={['hover']} placement="bottomRight">
|
<Dropdown menu={menu} trigger={['hover']} placement="bottomRight">
|
||||||
<MoreOutlined
|
<MoreOutlined
|
||||||
|
data-testid="widget-header-options"
|
||||||
className={`widget-header-more-options ${
|
className={`widget-header-more-options ${
|
||||||
parentHover ? 'widget-header-hover' : ''
|
parentHover ? 'widget-header-hover' : ''
|
||||||
}`}
|
}`}
|
||||||
|
@ -411,7 +411,12 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
|
|||||||
trigger="click"
|
trigger="click"
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
>
|
>
|
||||||
<Button icon={<Ellipsis size={14} />} type="text" className="icons" />
|
<Button
|
||||||
|
icon={<Ellipsis size={14} />}
|
||||||
|
type="text"
|
||||||
|
className="icons"
|
||||||
|
data-testid="options"
|
||||||
|
/>
|
||||||
</Popover>
|
</Popover>
|
||||||
{!isDashboardLocked && editDashboard && (
|
{!isDashboardLocked && editDashboard && (
|
||||||
<SettingsDrawer drawerTitle="Dashboard Configuration" />
|
<SettingsDrawer drawerTitle="Dashboard Configuration" />
|
||||||
@ -422,7 +427,7 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
|
|||||||
onClick={onEmptyWidgetHandler}
|
onClick={onEmptyWidgetHandler}
|
||||||
icon={<PlusOutlined />}
|
icon={<PlusOutlined />}
|
||||||
type="primary"
|
type="primary"
|
||||||
data-testid="add-panel"
|
data-testid="add-panel-header"
|
||||||
>
|
>
|
||||||
New Panel
|
New Panel
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -163,6 +163,7 @@ function RightContainer({
|
|||||||
value={selectedGraph}
|
value={selectedGraph}
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
className="panel-type-select"
|
className="panel-type-select"
|
||||||
|
data-testid="panel-change-select"
|
||||||
>
|
>
|
||||||
{graphTypes.map((item) => (
|
{graphTypes.map((item) => (
|
||||||
<Option key={item.name} value={item.name}>
|
<Option key={item.name} value={item.name}>
|
||||||
|
@ -563,7 +563,12 @@ function NewWidget({ selectedGraph }: NewWidgetProps): JSX.Element {
|
|||||||
<Container>
|
<Container>
|
||||||
<div className="edit-header">
|
<div className="edit-header">
|
||||||
<div className="left-header">
|
<div className="left-header">
|
||||||
<X size={14} onClick={onClickDiscardHandler} className="discard-icon" />
|
<X
|
||||||
|
size={14}
|
||||||
|
onClick={onClickDiscardHandler}
|
||||||
|
className="discard-icon"
|
||||||
|
data-testid="discard-button"
|
||||||
|
/>
|
||||||
<Flex align="center" gap={24}>
|
<Flex align="center" gap={24}>
|
||||||
<Typography.Text className="configure-panel">
|
<Typography.Text className="configure-panel">
|
||||||
Configure panel
|
Configure panel
|
||||||
|
@ -216,6 +216,7 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'queryName',
|
'queryName',
|
||||||
'expression',
|
'expression',
|
||||||
'disabled',
|
'disabled',
|
||||||
|
'reduceTo',
|
||||||
'legend',
|
'legend',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -235,6 +236,7 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'queryName',
|
'queryName',
|
||||||
'expression',
|
'expression',
|
||||||
'disabled',
|
'disabled',
|
||||||
|
'reduceTo',
|
||||||
'legend',
|
'legend',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -252,6 +254,7 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'queryName',
|
'queryName',
|
||||||
'expression',
|
'expression',
|
||||||
'disabled',
|
'disabled',
|
||||||
|
'reduceTo',
|
||||||
'legend',
|
'legend',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -191,6 +191,7 @@ export const GroupByFilter = memo(function GroupByFilter({
|
|||||||
labelInValue
|
labelInValue
|
||||||
notFoundContent={isFetching ? <Spin size="small" /> : null}
|
notFoundContent={isFetching ? <Spin size="small" /> : null}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
|
data-testid="group-by"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -27,6 +27,7 @@ export const ReduceToFilter = memo(function ReduceToFilter({
|
|||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
options={REDUCE_TO_VALUES}
|
options={REDUCE_TO_VALUES}
|
||||||
value={currentValue}
|
value={currentValue}
|
||||||
|
data-testid="reduce-to"
|
||||||
labelInValue
|
labelInValue
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user