diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/frontend/token_access/token_access_spec.js | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/frontend/token_access/token_access_spec.js')
-rw-r--r-- | spec/frontend/token_access/token_access_spec.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/spec/frontend/token_access/token_access_spec.js b/spec/frontend/token_access/token_access_spec.js index c7323eb19fe..c4e29a52f1c 100644 --- a/spec/frontend/token_access/token_access_spec.js +++ b/spec/frontend/token_access/token_access_spec.js @@ -1,7 +1,8 @@ import { GlToggle, GlLoadingIcon } from '@gitlab/ui'; -import { createLocalVue, shallowMount, mount } from '@vue/test-utils'; +import { createLocalVue } from '@vue/test-utils'; import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; +import { mountExtended, shallowMountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import createFlash from '~/flash'; import TokenAccess from '~/token_access/components/token_access.vue'; @@ -41,15 +42,15 @@ describe('TokenAccess component', () => { const findToggle = () => wrapper.findComponent(GlToggle); const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); - const findAddProjectBtn = () => wrapper.find('[data-testid="add-project-button"]'); - const findRemoveProjectBtn = () => wrapper.find('[data-testid="remove-project-button"]'); + const findAddProjectBtn = () => wrapper.findByRole('button', { name: 'Add project' }); + const findRemoveProjectBtn = () => wrapper.findByRole('button', { name: 'Remove access' }); const findTokenSection = () => wrapper.find('[data-testid="token-section"]'); const createMockApolloProvider = (requestHandlers) => { return createMockApollo(requestHandlers); }; - const createComponent = (requestHandlers, mountFn = shallowMount) => { + const createComponent = (requestHandlers, mountFn = shallowMountExtended) => { wrapper = mountFn(TokenAccess, { localVue, provide: { @@ -138,7 +139,7 @@ describe('TokenAccess component', () => { [getProjectsWithCIJobTokenScopeQuery, getProjectsWithScope], [addProjectCIJobTokenScopeMutation, addProjectSuccessHandler], ], - mount, + mountExtended, ); await waitForPromises(); @@ -160,7 +161,7 @@ describe('TokenAccess component', () => { [getProjectsWithCIJobTokenScopeQuery, getProjectsWithScope], [addProjectCIJobTokenScopeMutation, addProjectFailureHandler], ], - mount, + mountExtended, ); await waitForPromises(); @@ -181,7 +182,7 @@ describe('TokenAccess component', () => { [getProjectsWithCIJobTokenScopeQuery, getProjectsWithScope], [removeProjectCIJobTokenScopeMutation, removeProjectSuccessHandler], ], - mount, + mountExtended, ); await waitForPromises(); @@ -203,7 +204,7 @@ describe('TokenAccess component', () => { [getProjectsWithCIJobTokenScopeQuery, getProjectsWithScope], [removeProjectCIJobTokenScopeMutation, removeProjectFailureHandler], ], - mount, + mountExtended, ); await waitForPromises(); |