Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Mobile
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
200
Issues
200
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Commits
623619db
Commit
623619db
authored
1 hour ago
by
Martin Santangelo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix) activity screen spec test
parent
04b7da57
feat/permissions-implementation-model-activitysheet-channels
1 merge request
!387
WIP: Permissions EPIC
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
__tests__/activity/components/ActivityScreen.js
__tests__/activity/components/ActivityScreen.js
+2
-1
__tests__/activity/components/__snapshots__/ActivityScreen.js.snap
.../activity/components/__snapshots__/ActivityScreen.js.snap
+30
-4
No files found.
__tests__/activity/components/ActivityScreen.js
View file @
623619db
...
...
@@ -10,6 +10,7 @@ import { commentsServiceFaker } from '../../../__mocks__/fake/CommentsFaker';
import
{
activitiesServiceFaker
}
from
'
../../../__mocks__/fake/ActivitiesFaker
'
;
import
CommentList
from
'
../../../src/comments/CommentList
'
;
import
entitiesService
from
'
../../../src/common/services/entities.service
'
;
import
ActivityModel
from
'
../../../src/newsfeed/ActivityModel
'
;
jest
.
mock
(
'
../../../src/newsfeed/NewsfeedService
'
);
jest
.
mock
(
'
../../../src/newsfeed/activity/Activity
'
,
()
=>
'
Activity
'
);
...
...
@@ -48,7 +49,7 @@ describe('Activity screen component', () => {
}
};
entitiesService
.
single
.
mockResolvedValue
(
navigation
.
state
.
params
.
entity
);
entitiesService
.
single
.
mockResolvedValue
(
ActivityModel
.
create
(
navigation
.
state
.
params
.
entity
)
);
screen
=
shallow
(
<
ActivityScreen
navigation
=
{
navigation
}
/
>
...
...
This diff is collapsed.
Click to expand it.
__tests__/activity/components/__snapshots__/ActivityScreen.js.snap
View file @
623619db
...
...
@@ -17,9 +17,12 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
>
<CommentList
entity={
Object {
ActivityModel {
"__list": null,
"allow_comments": true,
"attachment_guid": false,
"blurb": false,
"comments:count": undefined,
"containerObj": undefined,
"container_guid": "activityguid0",
"custom_data": false,
...
...
@@ -27,9 +30,12 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"is_visible": true,
"mature": false,
"mature_visibility": false,
"message": "Message",
"ownerObj": Object {
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"subtype": false,
"time_created": "1522036284",
...
...
@@ -37,10 +43,17 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
},
"owner_guid": "824853017709780997",
"parent_guid": "838106762591510528",
"paywall": undefined,
"perma_url": false,
"permissions": Object {},
"pinned": undefined,
"rowKey": "something0",
"shouldBeBlured": [MockFunction],
"thumbnail_src": false,
"thumbs:down:count": undefined,
"thumbs:down:user_guids": undefined,
"thumbs:up:count": undefined,
"thumbs:up:user_guids": undefined,
"time_created": "1522036284",
"title": "TITLE",
"type": "activity",
...
...
@@ -53,9 +66,12 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
<Activity
autoHeight={false}
entity={
Object {
ActivityModel {
"__list": null,
"allow_comments": true,
"attachment_guid": false,
"blurb": false,
"comments:count": undefined,
"containerObj": undefined,
"container_guid": "activityguid0",
"custom_data": false,
...
...
@@ -63,9 +79,12 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"is_visible": true,
"mature": false,
"mature_visibility": false,
"message": "Message",
"ownerObj": Object {
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"subtype": false,
"time_created": "1522036284",
...
...
@@ -73,10 +92,17 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
},
"owner_guid": "824853017709780997",
"parent_guid": "838106762591510528",
"paywall": undefined,
"perma_url": false,
"permissions": Object {},
"pinned": undefined,
"rowKey": "something0",
"shouldBeBlured": [MockFunction],
"thumbnail_src": false,
"thumbs:down:count": undefined,
"thumbs:down:user_guids": undefined,
"thumbs:up:count": undefined,
"thumbs:up:user_guids": undefined,
"time_created": "1522036284",
"title": "TITLE",
"type": "activity",
...
...
This diff is collapsed.
Click to expand it.
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