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
862
Issues
862
List
Boards
Labels
Service Desk
Milestones
Merge Requests
54
Merge Requests
54
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
582b5a7b
Commit
582b5a7b
authored
41 minutes ago
by
Ben Hayward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notifs dont seem to be working properly on sandbox, need to figure that out
parent
e7cbba4c
feat/notification-e2e-1640
1 merge request
!492
WIP: [Sprint/KiltedKoala](feat) e2e tests for notification and cleanup functions
Pipeline
#75834268
running with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
10 deletions
+32
-10
notification.spec.js
cypress/integration/notification.spec.js
+32
-10
No files found.
cypress/integration/notification.spec.js
View file @
582b5a7b
...
...
@@ -13,11 +13,20 @@ context('Notification', () => {
let
username
=
''
;
let
password
=
''
;
const
commentMessages
=
{
1
:
'
test 1
'
,
2
:
'
test 2
'
,
3
:
'
test 3
'
,
};
const
commentText
=
'
test comment
'
;
const
postText
=
'
test comment
'
const
hamburgerMenu
=
'
.m-v2-topbar__UserMenu > m-user-menu > div.m-user-menu.m-dropdown > a
'
;
const
logoutButton
=
'
.m-user-menu.m-dropdown > ul > li:nth-child(11) > a
'
;
const
postMenu
=
'
minds-activity:nth-child(2) > div > m-post-menu > button > i
'
;
const
deletePostOption
=
'
minds-activity:nth-child(2) m-post-menu > ul > li:nth-child(4)
'
;
const
deletePostButton
=
'
m-modal-confirm div:nth-child(1) > div > button.mdl-button--colored
'
;
const
channelButton
=
'
.m-v2-topbar__Top > div > a > minds-avatar > div
'
;
const
postCommentButton
=
'
m-comment__poster > div > div.minds-body > div > div > a.m-post-button
'
;
const
commentButton
=
'
minds-activity > div.tabs > minds-button-comment > a
'
;
const
commentInput
=
'
m-comment__poster minds-textarea > div
'
;
const
commentContent
=
'
.m-comment__bubble > p
'
;
const
notificationBell
=
'
m-notifications--topbar-toggle > a > i
'
;
before
(()
=>
{
username
=
generateRandomId
();
...
...
@@ -25,14 +34,14 @@ context('Notification', () => {
// make a new post on 2nd user.
cy
.
newUser
(
username
,
password
);
cy
.
post
(
commentMessages
[
1
]
);
cy
.
post
(
postText
);
cy
.
logout
();
});
after
(()
=>
{
cy
.
login
(
true
,
username
,
password
);
cy
.
deleteUser
(
username
,
password
);
});
//
after(() => {
//
cy.login(true, username, password);
//
cy.deleteUser(username, password);
//
});
beforeEach
(()
=>
{
cy
.
login
();
...
...
@@ -46,7 +55,20 @@ context('Notification', () => {
})
it
(
'
should alert the user that a post has been commented on
'
,
()
=>
{
// Comment on generated 2nd users post.
cy
.
get
(
commentButton
).
first
().
click
();
cy
.
get
(
commentInput
).
first
().
type
(
commentText
);
cy
.
get
(
postCommentButton
).
first
().
click
();
cy
.
get
(
commentContent
).
first
().
contains
(
commentText
);
// Logout, log into generated user.
cy
.
logout
();
cy
.
login
(
true
,
username
,
password
);
// Open their notifications
cy
.
get
(
notificationBell
).
click
();
// notifications not working on test env.
});
})
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