From baf8e0b54214737bfd23cc93ddbc8060b6329133 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Mon, 4 Jun 2018 10:06:00 +0200 Subject: [PATCH] SONAR-10842 Prevent user from submiting empty event names in project activity page --- .../components/{Event.js => Event.tsx} | 59 ++++---- .../components/forms/AddEventForm.js | 117 --------------- .../components/forms/AddEventForm.tsx | 67 +++++++++ .../components/forms/ChangeEventForm.js | 134 ------------------ .../components/forms/ChangeEventForm.tsx | 66 +++++++++ .../components/forms/RemoveAnalysisForm.js | 99 ------------- .../components/forms/RemoveAnalysisForm.tsx | 43 ++++++ .../components/forms/RemoveEventForm.js | 111 --------------- .../components/forms/RemoveEventForm.tsx | 51 +++++++ .../js/components/controls/ConfirmModal.tsx | 1 + .../__snapshots__/ConfirmModal-test.tsx.snap | 5 +- .../src/main/js/components/ui/buttons.tsx | 1 + 12 files changed, 260 insertions(+), 494 deletions(-) rename server/sonar-web/src/main/js/apps/projectActivity/components/{Event.js => Event.tsx} (79%) delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js create mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.js create mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js create mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js create mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/Event.js b/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx similarity index 79% rename from server/sonar-web/src/main/js/apps/projectActivity/components/Event.js rename to server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx index 6d25558770f..0079c262147 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/Event.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx @@ -17,41 +17,32 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// @flow -import React from 'react'; +import * as React from 'react'; import EventInner from './EventInner'; import ChangeEventForm from './forms/ChangeEventForm'; import RemoveEventForm from './forms/RemoveEventForm'; import Tooltip from '../../../components/controls/Tooltip'; import { DeleteButton, EditButton } from '../../../components/ui/buttons'; import { translate } from '../../../helpers/l10n'; -/*:: import type { Event as EventType } from '../types'; */ +import { Event as IEvent } from '../../../api/projectActivity'; -/*:: -type Props = { - analysis: string, - canAdmin: boolean, - changeEvent: (event: string, name: string) => Promise<*>, - deleteEvent: (analysis: string, event: string) => Promise<*>, - event: EventType, - isFirst: boolean -}; -*/ +interface Props { + analysis: string; + canAdmin: boolean; + changeEvent: (event: string, name: string) => Promise; + deleteEvent: (analysis: string, event: string) => Promise; + event: IEvent; + isFirst: boolean; +} -/*:: -type State = { - changing: boolean, - deleting: boolean -}; -*/ +interface State { + changing: boolean; + deleting: boolean; +} -export default class Event extends React.PureComponent { - /*:: mounted: boolean; */ - /*:: props: Props; */ - state /*: State */ = { - changing: false, - deleting: false - }; +export default class Event extends React.PureComponent { + mounted = false; + state: State = { changing: false, deleting: false }; componentDidMount() { this.mounted = true; @@ -113,11 +104,13 @@ export default class Event extends React.PureComponent { {this.state.changing && ( )} @@ -127,10 +120,12 @@ export default class Event extends React.PureComponent { analysis={this.props.analysis} deleteEvent={this.props.deleteEvent} event={this.props.event} - onClose={this.stopDeleting} - removeEventButtonText={ - 'project_activity.' + (isVersion ? 'remove_version' : 'remove_custom_event') + header={ + isVersion + ? translate('project_activity.remove_version') + : translate('project_activity.remove_custom_event') } + onClose={this.stopDeleting} removeEventQuestion={`project_activity.${ isVersion ? 'remove_version' : 'remove_custom_event' }.question`} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js deleted file mode 100644 index e42126813e2..00000000000 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js +++ /dev/null @@ -1,117 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; -import Modal from '../../../../components/controls/Modal'; -import { translate } from '../../../../helpers/l10n'; -import { SubmitButton, ResetButtonLink } from '../../../../components/ui/buttons'; -/*:: import type { Analysis } from '../../types'; */ - -/*:: -type Props = { - addEvent: (analysis: string, name: string, category?: string) => Promise<*>, - analysis: Analysis, - addEventButtonText: string, - onClose: () => void; -}; -*/ - -/*:: -type State = { - processing: boolean, - name: string -}; -*/ - -export default class AddEventForm extends React.PureComponent { - /*:: mounted: boolean; */ - /*:: props: Props; */ - state /*: State */ = { - processing: false, - name: '' - }; - - componentDidMount() { - this.mounted = true; - } - - componentWillUnmount() { - this.mounted = false; - } - - changeInput = (e /*: Object */) => { - if (this.mounted) { - this.setState({ name: e.target.value }); - } - }; - - stopProcessing = () => { - if (this.mounted) { - this.setState({ processing: false }); - } - }; - - handleSubmit = (e /*: Object */) => { - e.preventDefault(); - this.setState({ processing: true }); - this.props - .addEvent(this.props.analysis.key, this.state.name) - .then(this.props.onClose, this.stopProcessing); - }; - - render() { - const header = translate(this.props.addEventButtonText); - return ( - -
-

{header}

-
- -
-
-
- - -
-
- -
- {this.state.processing ? ( - - ) : ( -
- {translate('save')} - - {translate('cancel')} - -
- )} -
- -
- ); - } -} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx new file mode 100644 index 00000000000..5b78e195669 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx @@ -0,0 +1,67 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; +import { translate } from '../../../../helpers/l10n'; +import { Analysis } from '../../../../api/projectActivity'; + +interface Props { + addEvent: (analysis: string, name: string, category?: string) => Promise; + addEventButtonText: string; + analysis: Analysis; + onClose: () => void; +} + +interface State { + name: string; +} + +export default class AddEventForm extends React.PureComponent { + state: State = { name: '' }; + + handleNameChange = (event: React.ChangeEvent) => { + this.setState({ name: event.target.value }); + }; + + handleSubmit = () => { + return this.props.addEvent(this.props.analysis.key, this.state.name); + }; + + render() { + return ( + +
+ + +
+
+ ); + } +} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.js deleted file mode 100644 index 25465a67e9b..00000000000 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; -import Modal from '../../../../components/controls/Modal'; -import { translate } from '../../../../helpers/l10n'; -import { SubmitButton, ResetButtonLink } from '../../../../components/ui/buttons'; -/*:: import type { Event } from '../../types'; */ - -/*:: -type Props = { - changeEvent: (event: string, name: string) => Promise<*>, - changeEventButtonText: string, - event: Event, - onClose: () => void -}; -*/ - -/*:: -type State = { - processing: boolean, - name: string -}; -*/ - -export default class ChangeEventForm extends React.PureComponent { - /*:: mounted: boolean; */ - /*:: props: Props; */ - /*:: state: State; */ - - constructor(props /*: Props */) { - super(props); - this.state = { - processing: false, - name: props.event.name - }; - } - - componentDidMount() { - this.mounted = true; - } - - componentWillUnmount() { - this.mounted = false; - } - - closeForm = () => { - if (this.mounted) { - this.setState({ name: this.props.event.name }); - } - this.props.onClose(); - }; - - changeInput = (e /*: Object */) => { - if (this.mounted) { - this.setState({ name: e.target.value }); - } - }; - - stopProcessing = () => { - if (this.mounted) { - this.setState({ processing: false }); - } - }; - - stopProcessingAndClose = () => { - if (this.mounted) { - this.setState({ processing: false }); - } - this.props.onClose(); - }; - - handleSubmit = (e /*: Object */) => { - e.preventDefault(); - this.setState({ processing: true }); - this.props - .changeEvent(this.props.event.key, this.state.name) - .then(this.stopProcessingAndClose, this.stopProcessing); - }; - - render() { - const header = translate(this.props.changeEventButtonText); - return ( - -
-

{header}

-
- -
-
-
- - -
-
- -
- {this.state.processing ? ( - - ) : ( -
- {translate('change_verb')} - {translate('cancel')} -
- )} -
- -
- ); - } -} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx new file mode 100644 index 00000000000..c31910aef5c --- /dev/null +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx @@ -0,0 +1,66 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import { translate } from '../../../../helpers/l10n'; +import { Event } from '../../../../api/projectActivity'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; + +interface Props { + changeEvent: (event: string, name: string) => Promise; + header: string; + event: Event; + onClose: () => void; +} + +interface State { + name: string; +} + +export default class ChangeEventForm extends React.PureComponent { + constructor(props: Props) { + super(props); + this.state = { name: props.event.name }; + } + + changeInput = (event: React.ChangeEvent) => { + this.setState({ name: event.target.value }); + }; + + handleSubmit = () => { + return this.props.changeEvent(this.props.event.key, this.state.name); + }; + + render() { + const { name } = this.state; + return ( + +
+ + +
+
+ ); + } +} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js deleted file mode 100644 index e0e5dd70d48..00000000000 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; -import Modal from '../../../../components/controls/Modal'; -import { translate } from '../../../../helpers/l10n'; -import { SubmitButton, ResetButtonLink } from '../../../../components/ui/buttons'; -/*:: import type { Analysis } from '../../types'; */ - -/*:: -type Props = { - analysis: Analysis, - deleteAnalysis: (analysis: string) => Promise<*>, - onClose: () => void; -}; -*/ - -/*:: -type State = { - processing: boolean -}; -*/ - -export default class RemoveAnalysisForm extends React.PureComponent { - /*:: mounted: boolean; */ - /*:: props: Props; */ - state /*: State */ = { - processing: false - }; - - componentDidMount() { - this.mounted = true; - } - - componentWillUnmount() { - this.mounted = false; - } - - stopProcessing = () => { - if (this.mounted) { - this.setState({ processing: false }); - } - }; - - handleSubmit = (e /*: Event */) => { - e.preventDefault(); - this.setState({ processing: true }); - this.props - .deleteAnalysis(this.props.analysis.key) - .then(this.props.onClose, this.stopProcessing); - }; - - render() { - const header = translate('project_activity.delete_analysis'); - return ( - -
-

{header}

-
- -
-
{translate('project_activity.delete_analysis.question')}
- -
- {this.state.processing ? ( - - ) : ( -
- - {translate('delete')} - - - {translate('cancel')} - -
- )} -
- -
- ); - } -} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx new file mode 100644 index 00000000000..c4eb5fa2ae4 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx @@ -0,0 +1,43 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import { translate } from '../../../../helpers/l10n'; +import { Analysis } from '../../../../api/projectActivity'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; + +interface Props { + analysis: Analysis; + deleteAnalysis: (analysis: string) => Promise; + onClose: () => void; +} + +export default function RemoveAnalysisForm({ analysis, deleteAnalysis, onClose }: Props) { + return ( + + {translate('project_activity.delete_analysis.question')} + + ); +} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js deleted file mode 100644 index 5b5db9eb199..00000000000 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; -import Modal from '../../../../components/controls/Modal'; -import { translate } from '../../../../helpers/l10n'; -import { SubmitButton, ResetButtonLink } from '../../../../components/ui/buttons'; -/*:: import type { Event } from '../../types'; */ - -/*:: -type Props = { - analysis: string, - deleteEvent: (analysis: string, event: string) => Promise<*>, - event: Event, - removeEventButtonText: string, - removeEventQuestion: string, - onClose: () => void -}; -*/ - -/*:: -type State = { - processing: boolean -}; -*/ - -export default class RemoveEventForm extends React.PureComponent { - /*:: mounted: boolean; */ - /*:: props: Props; */ - state /*: State */ = { - processing: false - }; - - componentDidMount() { - this.mounted = true; - } - - componentWillUnmount() { - this.mounted = false; - } - - closeForm = () => { - this.props.onClose(); - }; - - stopProcessing = () => { - if (this.mounted) { - this.setState({ processing: false }); - } - }; - - stopProcessingAndClose = () => { - if (this.mounted) { - this.setState({ processing: false }); - } - this.props.onClose(); - }; - - handleSubmit = (e /*: Object */) => { - e.preventDefault(); - this.setState({ processing: true }); - this.props - .deleteEvent(this.props.analysis, this.props.event.key) - .then(this.stopProcessingAndClose, this.stopProcessing); - }; - - render() { - const header = translate(this.props.removeEventButtonText); - return ( - -
-

{header}

-
- -
-
{translate(this.props.removeEventQuestion)}
- -
- {this.state.processing ? ( - - ) : ( -
- - {translate('delete')} - - {translate('cancel')} -
- )} -
- -
- ); - } -} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx new file mode 100644 index 00000000000..df25f6f279f --- /dev/null +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx @@ -0,0 +1,51 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import { translate } from '../../../../helpers/l10n'; +import { Event } from '../../../../api/projectActivity'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; + +interface Props { + analysis: string; + deleteEvent: (analysis: string, event: string) => Promise; + event: Event; + header: string; + removeEventQuestion: string; + onClose: () => void; +} + +export default class RemoveEventForm extends React.PureComponent { + handleSubmit = () => { + return this.props.deleteEvent(this.props.analysis, this.props.event.key); + }; + + render() { + return ( + + {translate(this.props.removeEventQuestion)} + + ); + } +} diff --git a/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx index 6456e5a790c..cd34fcafb0b 100644 --- a/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx +++ b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx @@ -66,6 +66,7 @@ export default class ConfirmModal extends React.PureComponent {confirmButtonText} diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap index 800e634ed8a..96172d41b93 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap @@ -10,6 +10,7 @@ exports[`should confirm and close after confirm 1`] = ` timeout={100} /> confirm @@ -61,7 +62,9 @@ exports[`should render correctly 2`] = ` loading={false} timeout={100} /> - + confirm