diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/frontend/create_cluster/gke_cluster/components/gke_submit_button_spec.js | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/frontend/create_cluster/gke_cluster/components/gke_submit_button_spec.js')
-rw-r--r-- | spec/frontend/create_cluster/gke_cluster/components/gke_submit_button_spec.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/spec/frontend/create_cluster/gke_cluster/components/gke_submit_button_spec.js b/spec/frontend/create_cluster/gke_cluster/components/gke_submit_button_spec.js deleted file mode 100644 index 2bf9158628c..00000000000 --- a/spec/frontend/create_cluster/gke_cluster/components/gke_submit_button_spec.js +++ /dev/null @@ -1,51 +0,0 @@ -import { shallowMount } from '@vue/test-utils'; -import Vue from 'vue'; -import Vuex from 'vuex'; -import GkeSubmitButton from '~/create_cluster/gke_cluster/components/gke_submit_button.vue'; - -Vue.use(Vuex); - -describe('GkeSubmitButton', () => { - let wrapper; - let store; - let hasValidData; - - const buildStore = () => - new Vuex.Store({ - getters: { - hasValidData, - }, - }); - - const buildWrapper = () => - shallowMount(GkeSubmitButton, { - store, - }); - - const bootstrap = () => { - store = buildStore(); - wrapper = buildWrapper(); - }; - - beforeEach(() => { - hasValidData = jest.fn(); - }); - - afterEach(() => { - wrapper.destroy(); - }); - - it('is disabled when hasValidData is false', () => { - hasValidData.mockReturnValueOnce(false); - bootstrap(); - - expect(wrapper.attributes('disabled')).toBe('disabled'); - }); - - it('is not disabled when hasValidData is true', () => { - hasValidData.mockReturnValueOnce(true); - bootstrap(); - - expect(wrapper.attributes('disabled')).toBeFalsy(); - }); -}); |