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-10-27 18:08:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-27 18:08:39 +0300
commit2b1e7f7dac0fa5d7bb3bdf415cec1b3c67ed77b0 (patch)
tree725ae8200573957bff6fa03aee237f738dadf1d7 /spec/frontend/ide
parenteb004dc626d3a1c9497e8b9dc0f3f578afd05fd9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ide')
-rw-r--r--spec/frontend/ide/components/terminal/empty_state_spec.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/spec/frontend/ide/components/terminal/empty_state_spec.js b/spec/frontend/ide/components/terminal/empty_state_spec.js
index a3f2089608d..e84ccec2686 100644
--- a/spec/frontend/ide/components/terminal/empty_state_spec.js
+++ b/spec/frontend/ide/components/terminal/empty_state_spec.js
@@ -1,5 +1,5 @@
import { shallowMount } from '@vue/test-utils';
-import { GlLoadingIcon } from '@gitlab/ui';
+import { GlLoadingIcon, GlButton } from '@gitlab/ui';
import { TEST_HOST } from 'spec/test_constants';
import TerminalEmptyState from '~/ide/components/terminal/empty_state.vue';
@@ -36,7 +36,7 @@ describe('IDE TerminalEmptyState', () => {
const img = wrapper.find('.svg-content img');
expect(img.exists()).toBe(true);
- expect(img.attributes('src')).toEqual(TEST_PATH);
+ expect(img.attributes('src')).toBe(TEST_PATH);
});
it('when loading, shows loading icon', () => {
@@ -71,24 +71,23 @@ describe('IDE TerminalEmptyState', () => {
},
});
- button = wrapper.find('button');
+ button = wrapper.find(GlButton);
});
it('shows button', () => {
- expect(button.text()).toEqual('Start Web Terminal');
- expect(button.attributes('disabled')).toBeFalsy();
+ expect(button.text()).toBe('Start Web Terminal');
+ expect(button.props('disabled')).toBe(false);
});
it('emits start when button is clicked', () => {
- expect(wrapper.emitted().start).toBeFalsy();
-
- button.trigger('click');
+ expect(wrapper.emitted().start).toBeUndefined();
+ button.vm.$emit('click');
expect(wrapper.emitted().start).toHaveLength(1);
});
it('shows help path link', () => {
- expect(wrapper.find('a').attributes('href')).toEqual(TEST_HELP_PATH);
+ expect(wrapper.find('a').attributes('href')).toBe(TEST_HELP_PATH);
});
});
@@ -101,7 +100,7 @@ describe('IDE TerminalEmptyState', () => {
},
});
- expect(wrapper.find('button').attributes('disabled')).not.toBe(null);
- expect(wrapper.find('.bs-callout').element.innerHTML).toEqual(TEST_HTML_MESSAGE);
+ expect(wrapper.find(GlButton).props('disabled')).toBe(true);
+ expect(wrapper.find('.bs-callout').element.innerHTML).toBe(TEST_HTML_MESSAGE);
});
});