Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 12:09:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 12:09:29 +0300
commit3fd97b4bba24ca412112aad025a38a32c7a6cf8c (patch)
tree4aacc8a184522bcbc3db68df47620bc3d2cfcfd9 /spec/frontend/registry/settings/components/registry_settings_app_spec.js
parentc52239391bf29f640e1e0af98edbd337c0293940 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/registry/settings/components/registry_settings_app_spec.js')
-rw-r--r--spec/frontend/registry/settings/components/registry_settings_app_spec.js27
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);
});
});
});