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
864
Issues
864
List
Boards
Labels
Service Desk
Milestones
Merge Requests
51
Merge Requests
51
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
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
40381ea2
Commit
40381ea2
authored
18 minutes ago
by
Brian Hatchet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Blog xhr routes
parent
2ed394f1
feat/closed-channels-602
1 merge request
!499
Feat/closed channels 602
Pipeline
#77635499
running with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
blogs.spec.js
cypress/integration/blogs.spec.js
+17
-4
No files found.
cypress/integration/blogs.spec.js
View file @
40381ea2
...
...
@@ -20,8 +20,6 @@ context('Blogs', () => {
cy
.
get
(
'
.m-button--submit
'
).
click
();
cy
.
wait
(
100
);
cy
.
get
(
'
.m-blog--edit--error
'
).
contains
(
'
Error: You must provide a title
'
);
...
...
@@ -60,8 +58,6 @@ context('Blogs', () => {
cy
.
get
(
'
.m-channel--name .minds-button-edit button:first-child
'
).
click
();
cy
.
wait
(
100
);
cy
.
uploadFile
(
'
.minds-avatar input[type=file]
'
,
'
../fixtures/avatar.jpeg
'
,
'
image/jpg
'
);
cy
.
get
(
'
.m-channel--name .minds-button-edit button:last-child
'
).
click
();
...
...
@@ -113,8 +109,25 @@ context('Blogs', () => {
cy
.
get
(
'
.m-mature-info a
'
).
click
();
cy
.
get
(
'
.m-mature-info a span
'
).
contains
(
'
Mature content
'
);
cy
.
server
();
cy
.
route
(
"
POST
"
,
"
**/api/v1/blog/new
"
).
as
(
"
postBlog
"
);
cy
.
route
(
"
GET
"
,
"
**/api/v1/blog/**
"
).
as
(
"
getBlog
"
);
cy
.
get
(
'
.m-button--submit
'
).
click
({
force
:
true
});
// TODO: Investigate why disabled flag is being detected
cy
.
wait
(
'
@postBlog
'
).
then
((
xhr
)
=>
{
cy
.
log
(
xhr
);
expect
(
xhr
.
status
).
to
.
equal
(
200
);
expect
(
xhr
.
response
.
body
.
status
).
to
.
equal
(
"
success
"
);
});
cy
.
wait
(
'
@getBlog
'
).
then
((
xhr
)
=>
{
cy
.
log
(
xhr
);
expect
(
xhr
.
status
).
to
.
equal
(
200
);
expect
(
xhr
.
response
.
body
.
status
).
to
.
equal
(
"
success
"
);
expect
(
xhr
.
response
.
body
).
to
.
have
.
property
(
"
blog
"
);
});
cy
.
location
(
'
pathname
'
)
.
should
(
'
contains
'
,
`/
${
Cypress
.
env
().
username
}
/blog`
);
...
...
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