summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-03-07 19:45:46 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-03-07 19:45:46 +0000
commitc63afd30ed2c5a342c0c4d2347c948f622a66f00 (patch)
treec90e34b6471988a63198c70acee71987c205021d /spec/javascripts
parent318aeffcd735486ff3bbb99325825788918373c7 (diff)
downloadgitlab-ce-c63afd30ed2c5a342c0c4d2347c948f622a66f00.tar.gz
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/pipelines/nav_controls_spec.js4
-rw-r--r--spec/javascripts/pipelines/pipelines_spec.js14
2 files changed, 9 insertions, 9 deletions
diff --git a/spec/javascripts/pipelines/nav_controls_spec.js b/spec/javascripts/pipelines/nav_controls_spec.js
index f4cdc1d21ae..d6232f5c567 100644
--- a/spec/javascripts/pipelines/nav_controls_spec.js
+++ b/spec/javascripts/pipelines/nav_controls_spec.js
@@ -69,11 +69,11 @@ describe('Pipelines Nav Controls', () => {
});
it('should emit postAction event when reset runner cache button is clicked', () => {
- spyOn(component, '$on');
+ spyOn(component, '$emit');
component.$el.querySelector('.js-clear-cache').click();
- expect(component.$on).toHaveBeenCalledWith('postAction', 'foo');
+ expect(component.$emit).toHaveBeenCalledWith('resetRunnersCache', 'foo');
});
});
});
diff --git a/spec/javascripts/pipelines/pipelines_spec.js b/spec/javascripts/pipelines/pipelines_spec.js
index 84fd0329f08..7e242eb45e1 100644
--- a/spec/javascripts/pipelines/pipelines_spec.js
+++ b/spec/javascripts/pipelines/pipelines_spec.js
@@ -95,16 +95,16 @@ describe('Pipelines', () => {
expect(vm.$el.querySelector('.js-pipelines-tab-all').textContent.trim()).toContain('All');
});
- it('renders Run Pipeline button', () => {
+ it('renders Run Pipeline link', () => {
expect(vm.$el.querySelector('.js-run-pipeline').getAttribute('href')).toEqual(paths.newPipelinePath);
});
- it('renders CI Lint button', () => {
+ it('renders CI Lint link', () => {
expect(vm.$el.querySelector('.js-ci-lint').getAttribute('href')).toEqual(paths.ciLintPath);
});
it('renders Clear Runner Cache button', () => {
- expect(vm.$el.querySelector('.js-clear-cache').getAttribute('href')).toEqual(paths.resetCachePath);
+ expect(vm.$el.querySelector('.js-clear-cache').textContent.trim()).toEqual('Clear Runner Caches');
});
it('renders pipelines table', () => {
@@ -139,16 +139,16 @@ describe('Pipelines', () => {
expect(vm.$el.querySelector('.js-pipelines-tab-all').textContent.trim()).toContain('All');
});
- it('renders Run Pipeline button', () => {
+ it('renders Run Pipeline link', () => {
expect(vm.$el.querySelector('.js-run-pipeline').getAttribute('href')).toEqual(paths.newPipelinePath);
});
- it('renders CI Lint button', () => {
+ it('renders CI Lint link', () => {
expect(vm.$el.querySelector('.js-ci-lint').getAttribute('href')).toEqual(paths.ciLintPath);
});
it('renders Clear Runner Cache button', () => {
- expect(vm.$el.querySelector('.js-clear-cache').getAttribute('href')).toEqual(paths.resetCachePath);
+ expect(vm.$el.querySelector('.js-clear-cache').textContent.trim()).toEqual('Clear Runner Caches');
});
it('renders tab empty state', () => {
@@ -218,7 +218,7 @@ describe('Pipelines', () => {
it('renders buttons', () => {
expect(vm.$el.querySelector('.js-run-pipeline').getAttribute('href')).toEqual(paths.newPipelinePath);
expect(vm.$el.querySelector('.js-ci-lint').getAttribute('href')).toEqual(paths.ciLintPath);
- expect(vm.$el.querySelector('.js-clear-cache').getAttribute('href')).toEqual(paths.resetCachePath);
+ expect(vm.$el.querySelector('.js-clear-cache').textContent.trim()).toEqual('Clear Runner Caches');
});
it('renders error state', () => {