mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Update e2e selectors for Transformations (#78426)
* baldm0mma/e2e_selector_migration/ update labels * baldm0mma/e2e_selector_migration/ run prettier * baldm0mma/e2e_selector_migration/ add test * baldm0mma/ update results * baldm0mma/e2e_selector_migration/ update betterer
This commit is contained in:
parent
5acb981680
commit
4275f2dc8c
@ -4979,9 +4979,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Styles should be written using objects.", "2"]
|
[0, 0, 0, "Styles should be written using objects.", "2"]
|
||||||
],
|
],
|
||||||
"public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [
|
"public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "1"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
|
||||||
],
|
],
|
||||||
"public/app/features/transformers/editors/RenameByRegexTransformer.tsx:5381": [
|
"public/app/features/transformers/editors/RenameByRegexTransformer.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
|
@ -11,5 +11,6 @@ describe('Panel edit tests - transformations', () => {
|
|||||||
e2e.components.Tab.title('Transform data').should('be.visible').click();
|
e2e.components.Tab.title('Transform data').should('be.visible').click();
|
||||||
e2e.components.TransformTab.newTransform('Reduce').scrollIntoView().should('be.visible').click();
|
e2e.components.TransformTab.newTransform('Reduce').scrollIntoView().should('be.visible').click();
|
||||||
e2e.components.Transforms.Reduce.calculationsLabel().should('be.visible');
|
e2e.components.Transforms.Reduce.calculationsLabel().should('be.visible');
|
||||||
|
e2e.components.Transforms.Reduce.modeLabel().should('be.visible');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -229,8 +229,8 @@ export const Components = {
|
|||||||
Transforms: {
|
Transforms: {
|
||||||
card: (name: string) => `data-testid New transform ${name}`,
|
card: (name: string) => `data-testid New transform ${name}`,
|
||||||
Reduce: {
|
Reduce: {
|
||||||
modeLabel: 'Transform mode label',
|
modeLabel: 'data-testid Transform mode label',
|
||||||
calculationsLabel: 'Transform calculations label',
|
calculationsLabel: 'data-testid Transform calculations label',
|
||||||
},
|
},
|
||||||
SpatialOperations: {
|
SpatialOperations: {
|
||||||
actionLabel: 'root Action field property editor',
|
actionLabel: 'root Action field property editor',
|
||||||
|
@ -58,7 +58,7 @@ export const ReduceTransformerEditor = ({ options, onChange }: TransformerUIProp
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<InlineField label="Mode" aria-label={selectors.components.Transforms.Reduce.modeLabel} grow labelWidth={16}>
|
<InlineField label="Mode" data-testid={selectors.components.Transforms.Reduce.modeLabel} grow labelWidth={16}>
|
||||||
<Select
|
<Select
|
||||||
options={modes}
|
options={modes}
|
||||||
value={modes.find((v) => v.value === options.mode) || modes[0]}
|
value={modes.find((v) => v.value === options.mode) || modes[0]}
|
||||||
@ -67,7 +67,7 @@ export const ReduceTransformerEditor = ({ options, onChange }: TransformerUIProp
|
|||||||
</InlineField>
|
</InlineField>
|
||||||
<InlineField
|
<InlineField
|
||||||
label="Calculations"
|
label="Calculations"
|
||||||
aria-label={selectors.components.Transforms.Reduce.calculationsLabel}
|
data-testid={selectors.components.Transforms.Reduce.calculationsLabel}
|
||||||
grow
|
grow
|
||||||
labelWidth={16}
|
labelWidth={16}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user