diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-09 03:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-09 03:08:47 +0300 |
commit | 7258040618b5093cbb65035d2af4718db3a993a4 (patch) | |
tree | a33b762d2aa4bc086f39256bf296ab3b617e2ab5 /spec/frontend/clusters_list | |
parent | d48cbe178636a01db031327b93b6e3b279c12aa5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/clusters_list')
-rw-r--r-- | spec/frontend/clusters_list/components/clusters_spec.js | 33 | ||||
-rw-r--r-- | spec/frontend/clusters_list/mock_data.js | 2 |
2 files changed, 16 insertions, 19 deletions
diff --git a/spec/frontend/clusters_list/components/clusters_spec.js b/spec/frontend/clusters_list/components/clusters_spec.js index 4ca2ccba385..9f76078a69a 100644 --- a/spec/frontend/clusters_list/components/clusters_spec.js +++ b/spec/frontend/clusters_list/components/clusters_spec.js @@ -83,24 +83,21 @@ describe('Clusters', () => { describe('cluster status', () => { it.each` - statusName | className | lineNumber - ${'disabled'} | ${'disabled'} | ${0} - ${'unreachable'} | ${'bg-danger'} | ${1} - ${'authentication_failure'} | ${'bg-warning'} | ${2} - ${'deleting'} | ${null} | ${3} - ${'created'} | ${'bg-success'} | ${4} - ${'default'} | ${'bg-white'} | ${5} - `('renders a status for each cluster', ({ statusName, className, lineNumber }) => { - const statuses = findStatuses(); - const status = statuses.at(lineNumber); - if (statusName !== 'deleting') { - const statusIndicator = status.find('.cluster-status-indicator'); - expect(statusIndicator.exists()).toBe(true); - expect(statusIndicator.classes()).toContain(className); - } else { - expect(status.find(GlLoadingIcon).exists()).toBe(true); - } - }); + statusName | lineNumber | result + ${'creating'} | ${0} | ${true} + ${null} | ${1} | ${false} + ${null} | ${2} | ${false} + ${'deleting'} | ${3} | ${true} + ${null} | ${4} | ${false} + ${null} | ${5} | ${false} + `( + 'renders $result when status=$statusName and lineNumber=$lineNumber', + ({ lineNumber, result }) => { + const statuses = findStatuses(); + const status = statuses.at(lineNumber); + expect(status.find(GlLoadingIcon).exists()).toBe(result); + }, + ); }); describe('nodes present', () => { diff --git a/spec/frontend/clusters_list/mock_data.js b/spec/frontend/clusters_list/mock_data.js index 893061f86e8..6ce0aa90f10 100644 --- a/spec/frontend/clusters_list/mock_data.js +++ b/spec/frontend/clusters_list/mock_data.js @@ -3,7 +3,7 @@ export const clusterList = [ name: 'My Cluster 1', environment_scope: '*', cluster_type: 'group_type', - status: 'disabled', + status: 'creating', nodes: null, }, { |