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()
.click({ force: true })
.within(() => {
e2e()
.get('input')
.should('be.checked');
});
.should('be.checked');
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsIncludeAllSwitch()
.click({ force: true })
.within(() => {
e2e()
.get('input')
.should('be.checked');
});
.should('be.checked');
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsCustomAllInput().within(input => {
expect(input.attr('placeholder')).equals('blank = auto');

View File

@@ -25,18 +25,18 @@ export const Controlled = () => {
return (
<div>
<p>
<div style={{ marginBottom: '32px' }}>
<Field label="Normal switch" description="For horizontal forms">
<Switch value={checked} disabled={disabled} onChange={onChange} />
</Field>
</p>
<p>
</div>
<div style={{ marginBottom: '32px' }}>
<InlineFieldRow>
<InlineField label="My switch">
<InlineSwitch value={checked} disabled={disabled} onChange={onChange} />
</InlineField>
</InlineFieldRow>
</p>
</div>
</div>
);
};