Skip to content

Commit

Permalink
Removes duplicate code, moves component contents inline
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHeiligers committed Sep 2, 2021
1 parent 7fac104 commit 317a448
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@ export const ImportModeControl = ({ initialValues, updateSelection }: ImportMode
updateSelection({ createNewCopies, overwrite, ...partial });
};

const overwriteRadio = (
<EuiRadioGroup
options={[overwriteEnabled, overwriteDisabled]}
idSelected={overwrite ? overwriteEnabled.id : overwriteDisabled.id}
onChange={(id: string) => onChange({ overwrite: id === overwriteEnabled.id })}
disabled={createNewCopies}
data-test-subj={'savedObjectsManagement-importModeControl-overwriteRadioGroup'}
/>
);

return (
<EuiFormFieldset
legend={{
Expand All @@ -125,7 +115,13 @@ export const ImportModeControl = ({ initialValues, updateSelection }: ImportMode
checked={!createNewCopies}
onChange={() => onChange({ createNewCopies: false })}
>
{overwriteRadio}
<EuiRadioGroup
options={[overwriteEnabled, overwriteDisabled]}
idSelected={overwrite ? overwriteEnabled.id : overwriteDisabled.id}
onChange={(id: string) => onChange({ overwrite: id === overwriteEnabled.id })}
disabled={createNewCopies}
data-test-subj={'savedObjectsManagement-importModeControl-overwriteRadioGroup'}
/>
</EuiCheckableCard>

<EuiSpacer size="s" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export class SavedObjectsPageObject extends FtrService {

async checkImportSucceeded() {
await this.testSubjects.existOrFail('importSavedObjectsSuccess', { timeout: 20000 });
await this.testSubjects.existOrFail('importSavedObjectsSuccess', { timeout: 20000 });
}

async checkNoneImported() {
Expand Down

0 comments on commit 317a448

Please sign in to comment.