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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
f21e13ae
Commit
f21e13ae
authored
Nov 22, 2016
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace static fixture for awards_handler_spec (!7661)
parent
0d04db92
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
57 deletions
+9
-57
changelogs/unreleased/awards_handler.yml
changelogs/unreleased/awards_handler.yml
+4
-0
spec/javascripts/awards_handler_spec.js
spec/javascripts/awards_handler_spec.js
+5
-5
spec/javascripts/fixtures/awards_handler.html.haml
spec/javascripts/fixtures/awards_handler.html.haml
+0
-52
No files found.
changelogs/unreleased/awards_handler.yml
0 → 100644
View file @
f21e13ae
---
title
:
Replace static fixture for awards_handler_spec
merge_request
:
7661
author
:
winniehell
spec/javascripts/awards_handler_spec.js
View file @
f21e13ae
...
...
@@ -33,9 +33,9 @@
};
describe
(
'
AwardsHandler
'
,
function
()
{
fixture
.
preload
(
'
awards_handler.html
'
);
fixture
.
preload
(
'
issues/open-issue.html.raw
'
);
beforeEach
(
function
()
{
fixture
.
load
(
'
awards_handler.html
'
);
fixture
.
load
(
'
issues/open-issue.html.raw
'
);
awardsHandler
=
new
AwardsHandler
;
spyOn
(
awardsHandler
,
'
postEmoji
'
).
and
.
callFake
((
function
(
_this
)
{
return
function
(
url
,
emoji
,
cb
)
{
...
...
@@ -113,7 +113,7 @@
});
describe
(
'
::getAwardUrl
'
,
function
()
{
return
it
(
'
should return the url for request
'
,
function
()
{
return
expect
(
awardsHandler
.
getAwardUrl
()).
toBe
(
'
/gitlab-org/gitlab-test/issues/8
/toggle_award_emoji
'
);
return
expect
(
awardsHandler
.
getAwardUrl
()).
toBe
(
'
http://test.host/frontend-fixtures/issues-project/issues/1
/toggle_award_emoji
'
);
});
});
describe
(
'
::addAward and ::checkMutuality
'
,
function
()
{
...
...
@@ -209,7 +209,7 @@
$
(
'
.js-add-award
'
).
eq
(
0
).
click
();
$menu
=
$
(
'
.emoji-menu
'
);
$block
=
$
(
'
.js-awards-block
'
);
$emoji
=
$menu
.
find
(
"
.emoji-menu-list-item
"
+
selector
);
$emoji
=
$menu
.
find
(
'
.emoji-menu-list:not(.frequent-emojis)
'
+
selector
);
expect
(
$emoji
.
length
).
toBe
(
1
);
expect
(
$block
.
find
(
selector
).
length
).
toBe
(
0
);
$emoji
.
click
();
...
...
@@ -224,7 +224,7 @@
openEmojiMenuAndAddEmoji
();
$
(
'
.js-add-award
'
).
eq
(
0
).
click
();
$block
=
$
(
'
.js-awards-block
'
);
$emoji
=
$
(
'
.emoji-menu
'
).
find
(
"
.emoji-menu-list
-item
"
+
selector
);
$emoji
=
$
(
'
.emoji-menu
'
).
find
(
"
.emoji-menu-list
:not(.frequent-emojis)
"
+
selector
);
$emoji
.
click
();
return
expect
(
$block
.
find
(
selector
).
length
).
toBe
(
0
);
});
...
...
spec/javascripts/fixtures/awards_handler.html.haml
deleted
100644 → 0
View file @
0d04db92
.issue-details.issuable-details
.detail-page-description.content-block
%h2
.title
Quibusdam sint officiis earum molestiae ipsa autem voluptatem nisi rem.
.description.js-task-list-container.is-task-list-enabled
.wiki
%p
Qui exercitationem magnam optio quae fuga earum odio.
%textarea
.hidden.js-task-list-field
Qui exercitationem magnam optio quae fuga earum odio.
%small
.edited-text
.content-block.content-block-small
.awards.js-awards-block
{
"data-award-url"
=>
"/gitlab-org/gitlab-test/issues/8/toggle_award_emoji"
}
%button
.award-control.btn.js-emoji-btn
{
"data-placement"
=>
"bottom"
,
"data-title"
=>
""
,
:type
=>
"button"
}
.icon.emoji-icon.emoji-1F44D
{
"data-aliases"
=>
""
,
"data-emoji"
=>
"thumbsup"
,
"data-unicode-name"
=>
"1F44D"
,
:title
=>
"thumbsup"
}
%span
.award-control-text.js-counter
0
%button
.award-control.btn.js-emoji-btn
{
"data-placement"
=>
"bottom"
,
"data-title"
=>
""
,
:type
=>
"button"
}
.icon.emoji-icon.emoji-1F44E
{
"data-aliases"
=>
""
,
"data-emoji"
=>
"thumbsdown"
,
"data-unicode-name"
=>
"1F44E"
,
:title
=>
"thumbsdown"
}
%span
.award-control-text.js-counter
0
.award-menu-holder.js-award-holder
%button
.btn.award-control.js-add-award
{
:type
=>
"button"
}
%i
.fa.fa-smile-o.award-control-icon.award-control-icon-normal
%i
.fa.fa-spinner.fa-spin.award-control-icon.award-control-icon-loading
%span
.award-control-text
Add
%section
.issuable-discussion
#notes
%ul
#notes-list
.notes.main-notes-list.timeline
%li
#note_348
.note.note-row-348.timeline-entry
{
"data-author-id"
=>
"18"
,
"data-editable"
=>
""
}
.timeline-entry-inner
.timeline-icon
%a
{
:href
=>
"/u/agustin"
}
%img
.avatar.s40
{
:alt
=>
""
,
:src
=>
"#"
}
/
.timeline-content
.note-header
%a
.author_link
{
:href
=>
"/u/agustin"
}
%span
.author
Brenna Stokes
.inline.note-headline-light
@agustin commented
%a
{
:href
=>
"#note_348"
}
%time
11 days ago
.note-actions
%span
.note-role
Reporter
%a
.note-action-button.note-emoji-button.js-add-award.js-note-emoji
{
"data-position"
=>
"right"
,
:href
=>
"#"
,
:title
=>
"Award Emoji"
}
%i
.fa.fa-spinner.fa-spin
%i
.fa.fa-smile-o.link-highlight
.js-task-list-container.note-body.is-task-list-enabled
.note-text
%p
Suscipit sunt quia quisquam sed eveniet ipsam.
.note-awards
.awards.hidden.js-awards-block
{
"data-award-url"
=>
"/gitlab-org/gitlab-test/notes/348/toggle_award_emoji"
}
.award-menu-holder.js-award-holder
%button
.btn.award-control.js-add-award
{
:type
=>
"button"
}
%i
.fa.fa-smile-o.award-control-icon.award-control-icon-normal
%i
.fa.fa-spinner.fa-spin.award-control-icon.award-control-icon-loading
%span
.award-control-text
Add
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