summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-22 09:53:55 +0100
committerPhil Hughes <me@iamphill.com>2017-05-22 09:53:55 +0100
commit95efe5b3e32775e8b18d1a63f939855a3daa4a4e (patch)
tree351d89cd2124c314b2d1a25e59f885d30106ac9d
parent59db8b2ff46c9ec9676bea6720dfa8e7ca4c489f (diff)
downloadgitlab-ce-95efe5b3e32775e8b18d1a63f939855a3daa4a4e.tar.gz
Added test to check if warning is not visible
[ci skip]
-rw-r--r--app/assets/javascripts/issue_show/components/locked_warning.vue3
-rw-r--r--spec/javascripts/issue_show/components/form_spec.js8
2 files changed, 10 insertions, 1 deletions
diff --git a/app/assets/javascripts/issue_show/components/locked_warning.vue b/app/assets/javascripts/issue_show/components/locked_warning.vue
index 211f01084ad..1c2789f154a 100644
--- a/app/assets/javascripts/issue_show/components/locked_warning.vue
+++ b/app/assets/javascripts/issue_show/components/locked_warning.vue
@@ -13,7 +13,8 @@
Someone edited the issue at the same time you did. Please check out
<a
:href="currentPath"
- target="_blank">the issue</a>
+ target="_blank"
+ rel="nofollow">the issue</a>
and make sure your changes will not unintentionally remove theirs.
</div>
</template>
diff --git a/spec/javascripts/issue_show/components/form_spec.js b/spec/javascripts/issue_show/components/form_spec.js
index 16793a1fc9b..d91dc3ce1d0 100644
--- a/spec/javascripts/issue_show/components/form_spec.js
+++ b/spec/javascripts/issue_show/components/form_spec.js
@@ -10,6 +10,7 @@ describe('Inline edit form component', () => {
vm = new Component({
propsData: {
canDestroy: true,
+ canMove: true,
formState: {
title: 'b',
description: 'a',
@@ -17,12 +18,19 @@ describe('Inline edit form component', () => {
},
markdownPreviewUrl: '/',
markdownDocs: '/',
+ projectsAutocompleteUrl: '/',
},
}).$mount();
Vue.nextTick(done);
});
+ it('hides locked warning by default', () => {
+ expect(
+ vm.$el.querySelector('.alert'),
+ ).toBeNull();
+ });
+
it('shows locked warning if formState is different', (done) => {
vm.formState.lockedWarningVisible = true;