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 Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
830
Issues
830
List
Boards
Labels
Service Desk
Milestones
Merge Requests
45
Merge Requests
45
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
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
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Compare Revisions
c45fc8c6a8324d347767cd1026fe0e8d2c28db76...f6d4902253ee89c95ff1f2a03370d431a1707428
Source
f6d4902253ee89c95ff1f2a03370d431a1707428
Select Git revision
...
Target
c45fc8c6a8324d347767cd1026fe0e8d2c28db76
Select Git revision
Compare
Commits (2)
(e2e) Make the propagation tests in newsfeed e2e more reliable -
#1889
· c60734ce
Guy Thouret
authored
2 hours ago
c60734ce
(e2e) Navigate to newsfeed as this is where test expects to be -
#1889
· f6d49022
Guy Thouret
authored
1 hour ago
f6d49022
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
25 deletions
+23
-25
newsfeed.spec.js
cypress/integration/newsfeed.spec.js
+23
-25
No files found.
cypress/integration/newsfeed.spec.js
View file @
f6d49022
...
...
@@ -71,12 +71,22 @@ context('Newsfeed', () => {
).
click
();
cy
.
get
(
'
.minds-list > minds-activity:first textarea
'
).
clear
();
cy
.
get
(
'
.minds-list > minds-activity:first textarea
'
).
type
(
newContent
);
cy
.
get
(
'
.minds-list > minds-activity:first .mdl-button--colored
'
).
click
();
cy
.
get
(
'
.minds-list > minds-activity:first .m
inds-editable-container .m
dl-button--colored
'
).
click
();
cy
.
wait
(
'
@newsfeedEDIT
'
).
then
(
xhr
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
};
const
navigateToMediaPageFromNewsfeed
=
()
=>
{
cy
.
get
(
'
.minds-list > minds-activity:first .item-image img
'
).
should
(
'
be.visible
'
);
cy
.
get
(
'
.minds-list > minds-activity:first .item-image img
'
).
click
();
cy
.
get
(
'
.m-mediaModal__stage
'
).
trigger
(
'
mouseenter
'
);
cy
.
get
(
'
.m-mediaModal__overlayContainer
'
,
{
timeout
:
10000
}).
click
();
cy
.
location
(
'
pathname
'
,
{
timeout
:
20000
}).
should
(
'
contains
'
,
'
media
'
);
};
it
(
'
editing media post propagates to activity
'
,
()
=>
{
const
identifier
=
Math
.
floor
(
Math
.
random
()
*
100
);
const
content
=
'
This is a post with an image
'
+
identifier
;
...
...
@@ -86,14 +96,10 @@ context('Newsfeed', () => {
postActivityAndAwaitResponse
(
200
);
cy
.
get
(
'
.minds-list > minds-activity:first .message
'
).
contains
(
content
);
cy
.
get
(
'
.minds-list > minds-activity:first .item-image img
'
).
should
(
'
be.visible
'
);
cy
.
get
(
'
.minds-list > minds-activity:first .item-image img
'
).
click
();
cy
.
get
(
'
m-media--modal .permalink
'
).
click
();
cy
.
location
(
'
pathname
'
,
{
timeout
:
20000
}).
should
(
'
contains
'
,
'
media
'
);
cy
.
get
(
'
.m-media-content--heading
'
).
contains
(
content
);
navigateToMediaPageFromNewsfeed
();
cy
.
get
(
'
.m-media-content--heading
'
,
{
timeout
:
10000
}).
contains
(
content
);
cy
.
get
(
'
.minds-button-edit
'
).
click
();
const
newContent
=
content
+
'
changed
'
;
...
...
@@ -128,10 +134,11 @@ context('Newsfeed', () => {
const
newContent
=
content
+
'
changed
'
;
editActivityContent
(
newContent
);
cy
.
get
(
'
.minds-list > minds-activity:first .item-image img
'
).
click
();
cy
.
get
(
'
m-media--modal .permalink
'
).
click
();
cy
.
location
(
'
pathname
'
,
{
timeout
:
20000
}).
should
(
'
contains
'
,
'
media
'
);
cy
.
get
(
'
.m-media-content--heading
'
).
contains
(
newContent
);
cy
.
get
(
'
.minds-list > minds-activity:first .message
'
).
contains
(
content
);
navigateToMediaPageFromNewsfeed
();
cy
.
get
(
'
.m-media-content--heading
'
,
{
timeout
:
10000
}).
contains
(
newContent
);
navigateToNewsfeed
();
deleteActivityFromNewsfeed
();
...
...
@@ -274,26 +281,17 @@ context('Newsfeed', () => {
})
it
(
'
should post an activity with an image attachment
'
,
()
=>
{
navigateToNewsfeed
();
const
identifier
=
Math
.
floor
(
Math
.
random
()
*
100
);
const
content
=
'
This is a post with an image
'
+
identifier
;
newActivityContent
(
content
);
cy
.
uploadFile
(
'
#attachment-input-poster
'
,
'
../fixtures/international-space-station-1776401_1920.jpg
'
,
'
image/jpg
'
);
cy
.
wait
(
'
@mediaPOST
'
).
then
(
xhr
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
attachImageToActivity
();
postActivityAndAwaitResponse
(
200
);
cy
.
get
(
'
.minds-list > minds-activity:first
-child .message
'
).
contains
(
cy
.
get
(
'
.minds-list > minds-activity:first
.message
'
,
{
timeout
:
20000
}
).
contains
(
content
);
cy
.
get
(
'
.minds-list > minds-activity:first
-child
.item-image img
'
).
should
(
cy
.
get
(
'
.minds-list > minds-activity:first .item-image img
'
).
should
(
'
be.visible
'
);
...
...
This diff is collapsed.
Click to expand it.