diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-16 09:09:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-16 09:09:29 +0000 |
commit | 3fd97b4bba24ca412112aad025a38a32c7a6cf8c (patch) | |
tree | 4aacc8a184522bcbc3db68df47620bc3d2cfcfd9 /spec/frontend/registry/settings | |
parent | c52239391bf29f640e1e0af98edbd337c0293940 (diff) | |
download | gitlab-ce-3fd97b4bba24ca412112aad025a38a32c7a6cf8c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/registry/settings')
-rw-r--r-- | spec/frontend/registry/settings/components/registry_settings_app_spec.js | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/spec/frontend/registry/settings/components/registry_settings_app_spec.js b/spec/frontend/registry/settings/components/registry_settings_app_spec.js index e9ba65e4387..c83cc0c00dd 100644 --- a/spec/frontend/registry/settings/components/registry_settings_app_spec.js +++ b/spec/frontend/registry/settings/components/registry_settings_app_spec.js @@ -44,15 +44,6 @@ describe('Registry Settings App', () => { expect(store.dispatch).toHaveBeenCalledWith('fetchSettings'); }); - it('show a toast if fetchSettings fails', () => { - mountComponent({ dispatchMock: 'mockRejectedValue' }); - return wrapper.vm.$nextTick().then(() => - expect(wrapper.vm.$toast.show).toHaveBeenCalledWith(FETCH_SETTINGS_ERROR_MESSAGE, { - type: 'error', - }), - ); - }); - it('renders the setting form', () => { mountComponent(); expect(findSettingsComponent().exists()).toBe(true); @@ -68,7 +59,23 @@ describe('Registry Settings App', () => { }); it('shows an alert', () => { - expect(findAlert().exists()).toBe(true); + expect(findAlert().html()).toContain( + 'Currently, the Container Registry tag expiration feature is not available', + ); + }); + }); + + describe('fetchSettingsError', () => { + beforeEach(() => { + mountComponent({ dispatchMock: 'mockRejectedValue' }); + }); + + it('the form is hidden', () => { + expect(findSettingsComponent().exists()).toBe(false); + }); + + it('shows an alert', () => { + expect(findAlert().html()).toContain(FETCH_SETTINGS_ERROR_MESSAGE); }); }); }); |