summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-01-14 09:42:10 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-01-14 09:42:10 +0000
commit3bbc9a4b4405383429e460bfa519b8a20275a363 (patch)
tree615a20c998f8856c3c38178c168daf329559fc44 /spec
parent0102af0f373d4d1fc49b7cf16f682b5d4abaa397 (diff)
parentc814446b55242f3fb3aa0129fbe20c325476133d (diff)
downloadgitlab-ce-3bbc9a4b4405383429e460bfa519b8a20275a363.tar.gz
Merge branch 'move-job-cancel-btn' into 'master'
Move job cancel button Closes #55944 and #54812 See merge request gitlab-org/gitlab-ce!24074
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/jobs_spec.rb2
-rw-r--r--spec/javascripts/jobs/components/sidebar_spec.js4
-rw-r--r--spec/javascripts/jobs/store/getters_spec.js24
3 files changed, 3 insertions, 27 deletions
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb
index 60f37f4b74a..aff3ebaf632 100644
--- a/spec/features/projects/jobs_spec.rb
+++ b/spec/features/projects/jobs_spec.rb
@@ -191,7 +191,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
href = new_project_issue_path(project, options)
- page.within('.header-action-buttons') do
+ page.within('.build-sidebar') do
expect(find('.js-new-issue')['href']).to include(href)
end
end
diff --git a/spec/javascripts/jobs/components/sidebar_spec.js b/spec/javascripts/jobs/components/sidebar_spec.js
index b0bc16d7c64..3a02351460c 100644
--- a/spec/javascripts/jobs/components/sidebar_spec.js
+++ b/spec/javascripts/jobs/components/sidebar_spec.js
@@ -28,7 +28,7 @@ describe('Sidebar details block', () => {
store,
});
- expect(vm.$el.querySelector('.js-retry-job')).toBeNull();
+ expect(vm.$el.querySelector('.js-retry-button')).toBeNull();
});
});
@@ -70,7 +70,7 @@ describe('Sidebar details block', () => {
});
it('should render link to retry job', () => {
- expect(vm.$el.querySelector('.js-retry-job').getAttribute('href')).toEqual(job.retry_path);
+ expect(vm.$el.querySelector('.js-retry-button').getAttribute('href')).toEqual(job.retry_path);
});
it('should render link to cancel job', () => {
diff --git a/spec/javascripts/jobs/store/getters_spec.js b/spec/javascripts/jobs/store/getters_spec.js
index 4195d9d3680..7931b2af79f 100644
--- a/spec/javascripts/jobs/store/getters_spec.js
+++ b/spec/javascripts/jobs/store/getters_spec.js
@@ -8,30 +8,6 @@ describe('Job Store Getters', () => {
localState = state();
});
- describe('headerActions', () => {
- describe('with new issue path', () => {
- it('returns an array with action to create a new issue', () => {
- localState.job.new_issue_path = 'issues/new';
-
- expect(getters.headerActions(localState)).toEqual([
- {
- label: 'New issue',
- path: localState.job.new_issue_path,
- cssClass:
- 'js-new-issue btn btn-success btn-inverted d-none d-md-block d-lg-block d-xl-block',
- type: 'link',
- },
- ]);
- });
- });
-
- describe('without new issue path', () => {
- it('returns an empty array', () => {
- expect(getters.headerActions(localState)).toEqual([]);
- });
- });
- });
-
describe('headerTime', () => {
describe('when the job has started key', () => {
it('returns started key', () => {