Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-faraday
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-faraday
Commits
9dfde037
Commit
9dfde037
authored
6 years ago
by
Tania Fecheta
Browse files
Options
Downloads
Patches
Plain Diff
test(authsome-helpers): add tests to check if reviewers see other reports
parent
ded6dc77
No related branches found
No related tags found
3 merge requests
!176
Sprint 24
,
!171
Sprint 24
,
!166
Hin 1051 reviewers see all reports
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/xpub-faraday/tests/config/authsome-helpers.test.js
+43
-1
43 additions, 1 deletion
packages/xpub-faraday/tests/config/authsome-helpers.test.js
with
43 additions
and
1 deletion
packages/xpub-faraday/tests/config/authsome-helpers.test.js
+
43
−
1
View file @
9dfde037
...
...
@@ -116,7 +116,7 @@ describe('Authsome Helpers', () => {
const
{
files
=
{}
}
=
result
expect
(
files
.
coverLetter
).
toBeFalsy
()
})
it
(
'
reviewer should not see private comments
'
,
()
=>
{
it
(
'
reviewer should not see private comments
on the last version of the manuscript
'
,
()
=>
{
const
{
fragment
}
=
testFixtures
.
fragments
fragment
.
recommendations
=
[
{
...
...
@@ -143,6 +143,48 @@ describe('Authsome Helpers', () => {
expect
(
recommendations
[
0
].
comments
[
0
].
public
).
toEqual
(
true
)
})
it
(
'
reviewer should see other reviewers recommendations on previous version if he submitted a review on that fragment
'
,
()
=>
{
const
{
fragment
}
=
testFixtures
.
fragments
const
{
answerReviewer
}
=
testFixtures
.
users
const
result
=
ah
.
stripeFragmentByRole
({
fragment
,
role
:
'
reviewer
'
,
isLast
:
false
,
user
:
answerReviewer
,
})
const
{
recommendations
}
=
result
expect
(
recommendations
).
toHaveLength
(
7
)
})
it
(
'
reviewer should not see other reviewers recommendations on latest fragment
'
,
()
=>
{
const
{
fragment
}
=
testFixtures
.
fragments
const
{
answerReviewer
}
=
testFixtures
.
users
const
result
=
ah
.
stripeFragmentByRole
({
fragment
,
role
:
'
reviewer
'
,
isLast
:
true
,
user
:
answerReviewer
,
})
const
{
recommendations
}
=
result
expect
(
recommendations
).
toHaveLength
(
6
)
})
it
(
'
reviewer should not see any reviewer recommendation on previous version if he did not submit a review on that fragment
'
,
()
=>
{
const
{
fragment
}
=
testFixtures
.
fragments
const
{
inactiveReviewer
}
=
testFixtures
.
users
const
result
=
ah
.
stripeFragmentByRole
({
fragment
,
role
:
'
reviewer
'
,
isLast
:
false
,
user
:
inactiveReviewer
,
})
const
{
recommendations
}
=
result
expect
(
recommendations
).
toHaveLength
(
0
)
})
it
(
'
author should not see recommendations if a decision has not been made
'
,
()
=>
{
const
{
fragment
}
=
testFixtures
.
fragments
fragment
.
recommendations
=
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment