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
839
Issues
839
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
161369a1b35a30ceea7227cb2de3e21597eccf0c...329f7a5858e6ca9a0aab7ab42a10bcad66822828
Source
329f7a5858e6ca9a0aab7ab42a10bcad66822828
Select Git revision
...
Target
161369a1b35a30ceea7227cb2de3e21597eccf0c
Select Git revision
Compare
Commits (2)
Simplified and improved run time
· 87d5551a
Ben Hayward
authored
1 hour ago
87d5551a
Merge branch 'epic/minds-pro' of gitlab.com:minds/front into epic/minds-pro
· 329f7a58
Ben Hayward
authored
1 hour ago
329f7a58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
page.spec.js
cypress/integration/pro/page.spec.js
+7
-25
No files found.
cypress/integration/pro/page.spec.js
View file @
329f7a58
...
...
@@ -2,7 +2,6 @@
* @author Ben Hayward
* @desc E2E testing for Minds Pro's pages.
*/
context
(
'
Pro Page
'
,
()
=>
{
const
topBar
=
'
.m-proChannel__topbar
'
;
...
...
@@ -10,29 +9,24 @@ context('Pro Page', () => {
before
(()
=>
{
cy
.
clearCookies
();
cy
.
getCookie
(
'
minds_sess
'
)
.
then
((
sessionCookie
)
=>
{
if
(
sessionCookie
===
null
)
{
return
cy
.
login
(
true
);
}
});
.
then
((
sessionCookie
)
=>
{
if
(
sessionCookie
===
null
)
{
return
cy
.
login
(
true
);
}
});
cy
.
visit
(
`/pro/
${
Cypress
.
env
().
username
}
`
);
cy
.
get
(
topBar
);
});
beforeEach
(()
=>
{
cy
.
server
();
cy
.
route
(
"
GET
"
,
"
**/api/v2/pro/channel/*/content**
"
).
as
(
"
content
"
);
cy
.
preserveCookies
();
cy
.
visit
(
`/pro/
${
Cypress
.
env
().
username
}
`
);
cy
.
get
(
topBar
);
});
it
(
'
should load the feed tab
'
,
()
=>
{
cy
.
route
(
"
GET
"
,
"
**/api/v2/feeds/channel/*/activities/top**
"
).
as
(
"
activities
"
);
cy
.
contains
(
'
Feed
'
)
.
click
()
.
wait
(
'
@content
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
})
.
wait
(
'
@activities
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
...
...
@@ -42,9 +36,6 @@ context('Pro Page', () => {
cy
.
route
(
"
GET
"
,
"
**/api/v2/feeds/channel/*/videos/top**
"
).
as
(
"
videos
"
);
cy
.
contains
(
'
Videos
'
)
.
click
()
.
wait
(
'
@content
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
})
.
wait
(
'
@videos
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
...
...
@@ -54,9 +45,6 @@ context('Pro Page', () => {
cy
.
route
(
"
GET
"
,
"
**/api/v2/feeds/channel/*/images/top**
"
).
as
(
"
images
"
);
cy
.
contains
(
'
Images
'
)
.
click
()
.
wait
(
'
@content
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
})
.
wait
(
'
@images
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
...
...
@@ -66,9 +54,6 @@ context('Pro Page', () => {
cy
.
route
(
"
GET
"
,
"
**/api/v2/feeds/channel/*/blogs/top**
"
).
as
(
"
blogs
"
);
cy
.
contains
(
'
Articles
'
)
.
click
()
.
wait
(
'
@content
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
})
.
wait
(
'
@blogs
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
...
...
@@ -78,9 +63,6 @@ context('Pro Page', () => {
cy
.
route
(
"
GET
"
,
"
**/api/v2/feeds/channel/*/groups/top**
"
).
as
(
"
groups
"
);
cy
.
contains
(
'
Groups
'
)
.
click
()
.
wait
(
'
@content
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
})
.
wait
(
'
@groups
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
...
...
This diff is collapsed.
Click to expand it.