Commit 117625fb authored by Vitaly Slobodin's avatar Vitaly Slobodin

Remove flash messages

parent bdd752c9
<script> <script>
import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui'; import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui';
import { extendTrial, reactivateTrial } from 'ee/api/subscriptions_api'; import { extendTrial, reactivateTrial } from 'ee/api/subscriptions_api';
import createFlash, { FLASH_TYPES } from '~/flash'; import createFlash from '~/flash';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import { i18n, TRIAL_ACTION_EXTEND, TRIAL_ACTIONS } from '../constants'; import { i18n, TRIAL_ACTION_EXTEND, TRIAL_ACTIONS } from '../constants';
...@@ -29,7 +30,6 @@ export default { ...@@ -29,7 +30,6 @@ export default {
}, },
data() { data() {
return { return {
isButtonVisible: true,
isLoading: false, isLoading: false,
}; };
}, },
...@@ -65,8 +65,7 @@ export default { ...@@ -65,8 +65,7 @@ export default {
await action(this.namespaceId) await action(this.namespaceId)
.then(() => { .then(() => {
createFlash({ message: this.i18nContext.flashText, type: FLASH_TYPES.SUCCESS }); refreshCurrentPage();
this.isButtonVisible = false;
}) })
.catch((error) => { .catch((error) => {
createFlash({ createFlash({
......
...@@ -18,7 +18,6 @@ export const i18n = Object.freeze({ ...@@ -18,7 +18,6 @@ export const i18n = Object.freeze({
modalText: s__( modalText: s__(
'Billings|By reactivating your trial, you will receive an additional 30 days of %{planName}. Your trial can be only reactivated once.', 'Billings|By reactivating your trial, you will receive an additional 30 days of %{planName}. Your trial can be only reactivated once.',
), ),
flashText: s__('Billings|Your trial has been reactivated for an additional 30 days.'),
trialActionError: s__('Billings|An error occurred while reactivating your trial.'), trialActionError: s__('Billings|An error occurred while reactivating your trial.'),
}, },
}); });
...@@ -35,10 +35,6 @@ describe('ExtendReactivateTrialButton', () => { ...@@ -35,10 +35,6 @@ describe('ExtendReactivateTrialButton', () => {
}); });
}); });
it('renders the button visible', () => {
expect(findButton().isVisible()).toBe(true);
});
it('does not have loading icon', () => { it('does not have loading icon', () => {
expect(findButton().props('loading')).toBe(false); expect(findButton().props('loading')).toBe(false);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment