test: add some e2e tests for all pages filter (#2674)

This commit is contained in:
3720
2023-06-04 23:34:16 +08:00
committed by GitHub
parent 1716e7a397
commit b95808a052
3 changed files with 99 additions and 4 deletions

View File

@@ -68,7 +68,7 @@ const FunctionSelect = ({
return filterMatcher.allMatchedData(type);
}, [value.left.name]);
return (
<div>
<div data-testid="filter-name-select">
{list.map(v => (
<MenuItem
onClick={() => {
@@ -101,7 +101,7 @@ export const Arg = ({
return null;
}
return (
<div style={{ marginLeft: 4 }}>
<div data-testid="filter-arg" style={{ marginLeft: 4 }}>
{data.render({ type, value, onChange })}
</div>
);

View File

@@ -60,7 +60,7 @@ export const VariableSelect = ({
onSelect: (value: Filter) => void;
}) => {
return (
<div>
<div data-testid="variable-select">
<div className={styles.variableSelectTitleStyle}>Filter</div>
<div className={styles.variableSelectDividerStyle}></div>
{vars
@@ -74,7 +74,12 @@ export const VariableSelect = ({
}}
className={styles.menuItemStyle}
>
<div className={styles.menuItemTextStyle}>{v.name}</div>
<div
data-testid="variable-select-item"
className={styles.menuItemTextStyle}
>
{v.name}
</div>
</MenuItem>
))}
</div>