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
826
Issues
826
List
Boards
Labels
Service Desk
Milestones
Merge Requests
43
Merge Requests
43
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
Commits
02d0c2b7
Commit
02d0c2b7
authored
5 hours ago
by
Ben Hayward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to check correct endpoint and work more efficiently
parent
958ac3a6
fix/e2e-test-update-1910
1 merge request
!555
WIP: [Sprint/NuancedNumbat](fix): e2e test fixes
Pipeline
#82538913
running with stages
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
boost-impressions.spec.js
cypress/integration/boost/boost-impressions.spec.js
+21
-17
No files found.
cypress/integration/boost/boost-impressions.spec.js
View file @
02d0c2b7
...
...
@@ -7,37 +7,40 @@ context('Boost Impressions', () => {
return
cy
.
login
(
true
);
}
});
cy
.
visit
(
'
/newsfeed/subscriptions
'
);
cy
.
location
(
'
pathname
'
)
.
should
(
'
eq
'
,
`/newsfeed/subscriptions`
);
});
beforeEach
(()
=>
{
cy
.
server
();
cy
.
route
(
"
POST
"
,
"
**api/v2/analytics/views/boost/*
"
).
as
(
"
analytics
"
);
cy
.
route
(
"
GET
"
,
"
**/api/v2/feeds/subscribed/activities**
"
).
as
(
"
activities
"
);
cy
.
preserveCookies
();
cy
.
visit
(
'
/newsfeed/subscriptions
'
)
.
location
(
'
pathname
'
)
.
should
(
'
eq
'
,
`/newsfeed/subscriptions`
)
.
wait
(
'
@activities
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
});
afterEach
(()
=>
{
cy
.
reload
();
})
it
(
'
should register views on scroll
'
,
()
=>
{
//stub endpoint
cy
.
server
();
cy
.
route
(
"
POST
"
,
"
**/api/v2/analytics/views/activity/*
"
).
as
(
"
analytics
"
);
//load, scroll, wait to trigger analytics
cy
.
scrollTo
(
0
,
500
);
//smooth scroll
cy
.
scrollTo
(
'
0
'
,
'
1%
'
,
{
duration
:
100
});
//assert
cy
.
wait
(
'
@analytics
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
expect
(
xhr
.
response
.
body
).
to
.
deep
.
equal
({
status
:
'
success
'
});
});
});
it
(
'
should register views on boost rotate
'
,
()
=>
{
//stub endpoint
cy
.
server
();
cy
.
route
(
"
POST
"
,
"
**/api/v2/analytics/views/boost/*
"
).
as
(
"
analytics
"
);
//rotate forward and wait to trigger analytics
cy
.
get
(
'
m-newsfeed--boost-rotator > div > ul > li:nth-child(3) > i
'
)
cy
.
get
(
'
m-newsfeed--boost-rotator
'
)
.
find
(
'
chevron_right
'
)
.
click
();
//assert
...
...
@@ -47,7 +50,8 @@ context('Boost Impressions', () => {
});
//rotate forward and wait to trigger analytics
cy
.
get
(
'
m-newsfeed--boost-rotator > div > ul > li:nth-child(2) > i
'
)
cy
.
get
(
'
m-newsfeed--boost-rotator
'
)
.
find
(
'
chevron_left
'
)
.
click
();
//assert
...
...
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