Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d10eb61e
Commit
d10eb61e
authored
May 17, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve issue_title_description_spec.js conflict
parent
6fd7de6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
60 deletions
+0
-60
spec/javascripts/issue_show/issue_title_description_spec.js
spec/javascripts/issue_show/issue_title_description_spec.js
+0
-60
No files found.
spec/javascripts/issue_show/issue_title_description_spec.js
deleted
100644 → 0
View file @
6fd7de6f
import
Vue
from
'
vue
'
;
import
$
from
'
jquery
'
;
import
'
~/render_math
'
;
import
'
~/render_gfm
'
;
import
issueTitleDescription
from
'
~/issue_show/issue_title_description.vue
'
;
import
issueShowData
from
'
./mock_data
'
;
window
.
$
=
$
;
const
issueShowInterceptor
=
data
=>
(
request
,
next
)
=>
{
next
(
request
.
respondWith
(
JSON
.
stringify
(
data
),
{
status
:
200
,
headers
:
{
'
POLL-INTERVAL
'
:
1
,
},
}));
};
describe
(
'
Issue Title
'
,
()
=>
{
document
.
body
.
innerHTML
=
'
<span id="task_status"></span>
'
;
let
IssueTitleDescriptionComponent
;
beforeEach
(()
=>
{
IssueTitleDescriptionComponent
=
Vue
.
extend
(
issueTitleDescription
);
});
afterEach
(()
=>
{
Vue
.
http
.
interceptors
=
_
.
without
(
Vue
.
http
.
interceptors
,
issueShowInterceptor
);
});
it
(
'
should render a title/description and update title/description on update
'
,
(
done
)
=>
{
Vue
.
http
.
interceptors
.
push
(
issueShowInterceptor
(
issueShowData
.
initialRequest
));
const
issueShowComponent
=
new
IssueTitleDescriptionComponent
({
propsData
:
{
canUpdateIssue
:
'
.css-stuff
'
,
endpoint
:
'
/gitlab-org/gitlab-shell/issues/9/realtime_changes
'
,
},
}).
$mount
();
setTimeout
(()
=>
{
expect
(
document
.
querySelector
(
'
title
'
).
innerText
).
toContain
(
'
this is a title (#1)
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.title
'
).
innerHTML
).
toContain
(
'
<p>this is a title</p>
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.wiki
'
).
innerHTML
).
toContain
(
'
<p>this is a description!</p>
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.js-task-list-field
'
).
innerText
).
toContain
(
'
this is a description
'
);
Vue
.
http
.
interceptors
.
push
(
issueShowInterceptor
(
issueShowData
.
secondRequest
));
setTimeout
(()
=>
{
expect
(
document
.
querySelector
(
'
title
'
).
innerText
).
toContain
(
'
2 (#1)
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.title
'
).
innerHTML
).
toContain
(
'
<p>2</p>
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.wiki
'
).
innerHTML
).
toContain
(
'
<p>42</p>
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.js-task-list-field
'
).
innerText
).
toContain
(
'
42
'
);
done
();
});
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment