mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
InlineSwitch: Minor story fix (#30186)
* InlineSwitch: Minor story fix * Fix e2e test
This commit is contained in:
@@ -175,19 +175,11 @@ describe('Variables - Add variable', () => {
|
|||||||
|
|
||||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsMultiSwitch()
|
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsMultiSwitch()
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
.within(() => {
|
.should('be.checked');
|
||||||
e2e()
|
|
||||||
.get('input')
|
|
||||||
.should('be.checked');
|
|
||||||
});
|
|
||||||
|
|
||||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsIncludeAllSwitch()
|
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsIncludeAllSwitch()
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
.within(() => {
|
.should('be.checked');
|
||||||
e2e()
|
|
||||||
.get('input')
|
|
||||||
.should('be.checked');
|
|
||||||
});
|
|
||||||
|
|
||||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsCustomAllInput().within(input => {
|
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsCustomAllInput().within(input => {
|
||||||
expect(input.attr('placeholder')).equals('blank = auto');
|
expect(input.attr('placeholder')).equals('blank = auto');
|
||||||
|
|||||||
@@ -25,18 +25,18 @@ export const Controlled = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<div style={{ marginBottom: '32px' }}>
|
||||||
<Field label="Normal switch" description="For horizontal forms">
|
<Field label="Normal switch" description="For horizontal forms">
|
||||||
<Switch value={checked} disabled={disabled} onChange={onChange} />
|
<Switch value={checked} disabled={disabled} onChange={onChange} />
|
||||||
</Field>
|
</Field>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div style={{ marginBottom: '32px' }}>
|
||||||
<InlineFieldRow>
|
<InlineFieldRow>
|
||||||
<InlineField label="My switch">
|
<InlineField label="My switch">
|
||||||
<InlineSwitch value={checked} disabled={disabled} onChange={onChange} />
|
<InlineSwitch value={checked} disabled={disabled} onChange={onChange} />
|
||||||
</InlineField>
|
</InlineField>
|
||||||
</InlineFieldRow>
|
</InlineFieldRow>
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user