Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
6571ddb3
Commit
6571ddb3
authored
Oct 01, 2021
by
BryceLTaylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for comment notifications
parent
53b79f64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
test/integration/comments.test.js
test/integration/comments.test.js
+46
-0
No files found.
test/integration/comments.test.js
View file @
6571ddb3
...
...
@@ -129,4 +129,50 @@ describe('comment tests', async () => {
let
commentVisible
=
await
postedComment
.
isDisplayed
();
await
expect
(
commentVisible
).
toBe
(
true
);
});
// get notifications
test
(
'
get notification badge for comments
'
,
async
()
=>
{
await
signIn
(
username2
,
password
,
driver
);
await
findByXpath
(
'
//span[contains(@class, "profile-name")]
'
);
let
messages
=
await
findByXpath
(
'
//span[@class = "message-count show"]
'
);
let
messagesVisible
=
await
messages
.
isDisplayed
();
await
expect
(
messagesVisible
).
toBe
(
true
);
});
test
(
'
click notifications for comments
'
,
async
()
=>
{
await
signIn
(
username2
,
password
,
driver
);
await
findByXpath
(
'
//span[contains(@class, "profile-name")]
'
);
await
clickXpath
(
'
//li[@class="link right messages"]
'
);
let
messages
=
await
findByXpath
(
'
//ul[@class="messages-social-list"]
'
);
let
messagesVisible
=
await
messages
.
isDisplayed
();
await
expect
(
messagesVisible
).
toBe
(
true
);
});
test
(
'
project comment visible
'
,
async
()
=>
{
await
signIn
(
username2
,
password
,
driver
);
await
findByXpath
(
'
//span[contains(@class, "profile-name")]
'
);
await
driver
.
get
(
rootUrl
+
'
/messages
'
);
let
projectMessageXpath
=
'
//p[@class="emoji-text mod-comment"
'
+
`and contains(text(), "
${
projectComment
}
")]`
;
let
projectMessage
=
await
findByXpath
(
projectMessageXpath
);
let
projectMessageVisible
=
await
projectMessage
.
isDisplayed
();
await
expect
(
projectMessageVisible
).
toBe
(
true
);
});
test
(
'
profile comment visible
'
,
async
()
=>
{
await
signIn
(
username2
,
password
,
driver
);
await
findByXpath
(
'
//span[contains(@class, "profile-name")]
'
);
await
driver
.
get
(
rootUrl
+
'
/messages
'
);
let
profileMessageXpath
=
'
//p[@class="emoji-text mod-comment"
'
+
`and contains(text(), "
${
profileComment
}
")]`
;
let
profileMessage
=
await
findByXpath
(
profileMessageXpath
);
let
profileMessageVisible
=
await
profileMessage
.
isDisplayed
();
await
expect
(
profileMessageVisible
).
toBe
(
true
);
});
// studio comments do not send a notification
});
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