diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 06:11:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 06:11:39 +0300 |
commit | 37d1a6b416a10e64ba9194aacf7da97a5e30140f (patch) | |
tree | 54494e4ddcc6e128e2a0e11dc874cced46308918 /spec/frontend/google_cloud | |
parent | 21fc10ad5a7c829e64112fac37727f31f072ef33 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/google_cloud')
-rw-r--r-- | spec/frontend/google_cloud/service_accounts/list_spec.js | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/spec/frontend/google_cloud/service_accounts/list_spec.js b/spec/frontend/google_cloud/service_accounts/list_spec.js index 7a76a893757..c2bd2005b5d 100644 --- a/spec/frontend/google_cloud/service_accounts/list_spec.js +++ b/spec/frontend/google_cloud/service_accounts/list_spec.js @@ -1,5 +1,5 @@ import { mount } from '@vue/test-utils'; -import { GlAlert, GlButton, GlEmptyState, GlTable } from '@gitlab/ui'; +import { GlAlert, GlButton, GlEmptyState, GlLink, GlTable } from '@gitlab/ui'; import ServiceAccountsList from '~/google_cloud/service_accounts/list.vue'; describe('google_cloud/service_accounts/list', () => { @@ -45,7 +45,26 @@ describe('google_cloud/service_accounts/list', () => { beforeEach(() => { const propsData = { - list: [{}, {}, {}], + list: [ + { + ref: '*', + gcp_project: 'gcp-project-123', + service_account_exists: true, + service_account_key_exists: true, + }, + { + ref: 'prod', + gcp_project: 'gcp-project-456', + service_account_exists: true, + service_account_key_exists: true, + }, + { + ref: 'stag', + gcp_project: 'gcp-project-789', + service_account_exists: true, + service_account_key_exists: true, + }, + ], createUrl: '#create-url', emptyIllustrationUrl: '#empty-illustration-url', }; @@ -68,6 +87,12 @@ describe('google_cloud/service_accounts/list', () => { expect(findRows().length).toBe(4); }); + it('table row must contain link to the google cloud console', () => { + expect(findRows().at(1).findComponent(GlLink).attributes('href')).toBe( + `${ServiceAccountsList.GOOGLE_CONSOLE_URL}?project=gcp-project-123`, + ); + }); + it('shows the link to create new service accounts', () => { const button = findButton(); expect(button.exists()).toBe(true); |