InlineSwitch: Minor story fix (#30186)

* InlineSwitch: Minor story fix

* Fix e2e test
This commit is contained in:
Torkel Ödegaard
2021-01-11 14:44:48 +01:00
committed by GitHub
parent 74e1a34e74
commit b342e4f044
2 changed files with 6 additions and 14 deletions

View File

@@ -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');

View File

@@ -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>
); );
}; };