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
53b79f64
Commit
53b79f64
authored
Oct 01, 2021
by
BryceLTaylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use unique comment for each silo using silo name
parent
2c9771a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
test/integration/comments.test.js
test/integration/comments.test.js
+13
-5
No files found.
test/integration/comments.test.js
View file @
53b79f64
...
@@ -29,10 +29,18 @@ let profileUrl = `${rootUrl}/users/${username2}`;
...
@@ -29,10 +29,18 @@ let profileUrl = `${rootUrl}/users/${username2}`;
let
studioId
=
process
.
env
.
COMMENT_STUDIO_ID
||
10005646
;
let
studioId
=
process
.
env
.
COMMENT_STUDIO_ID
||
10005646
;
let
studioUrl
=
`
${
rootUrl
}
/studios/
${
studioId
}
/comments`
;
let
studioUrl
=
`
${
rootUrl
}
/studios/
${
studioId
}
/comments`
;
// setup comments to leave
let
date
=
new
Date
();
let
date
=
new
Date
();
let
dateString
=
`
${
date
.
getFullYear
()}
-
${
date
.
getMonth
()
+
1
}
-
${
date
.
getDate
()}
`
+
let
dateString
=
`
${
date
.
getFullYear
()}
-
${
date
.
getMonth
()
+
1
}
-
${
date
.
getDate
()}
`
+
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
:
${
date
.
getSeconds
()}
`
;
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
:
${
date
.
getSeconds
()}
`
;
let
buildNumber
=
process
.
env
.
CIRCLE_BUILD_NUM
||
dateString
;
let
buildNumber
=
process
.
env
.
CIRCLE_BUILD_NUM
||
dateString
;
let
projectComment
=
buildNumber
+
'
project
'
;
let
profileComment
=
buildNumber
+
'
profile
'
;
let
studioComment
=
buildNumber
+
'
studio
'
;
// let projectReply = buildNumber + ' project reply';
// let profileReply = buildNumber + ' profile reply';
// let studioReply = buildNumber + ' studio reply';
if
(
remote
)
{
if
(
remote
)
{
jest
.
setTimeout
(
60000
);
jest
.
setTimeout
(
60000
);
...
@@ -62,8 +70,8 @@ describe('comment tests', async () => {
...
@@ -62,8 +70,8 @@ describe('comment tests', async () => {
// leave the comment
// leave the comment
let
commentBox
=
await
findByXpath
(
'
//textArea[@name="compose-comment"]
'
);
let
commentBox
=
await
findByXpath
(
'
//textArea[@name="compose-comment"]
'
);
await
commentBox
.
sendKeys
(
buildNumber
);
await
commentBox
.
sendKeys
(
projectComment
);
await
findByXpath
(
`//textarea[contains(text(), "
${
buildNumber
}
")]`
);
await
findByXpath
(
`//textarea[contains(text(), "
${
projectComment
}
")]`
);
await
clickXpath
(
'
//button[@class="button compose-post"]
'
);
await
clickXpath
(
'
//button[@class="button compose-post"]
'
);
// reload the page
// reload the page
...
@@ -85,7 +93,7 @@ describe('comment tests', async () => {
...
@@ -85,7 +93,7 @@ describe('comment tests', async () => {
// leave the comment
// leave the comment
let
commentXpath
=
await
'
//form[@id="main-post-form"]/div/textArea
'
;
let
commentXpath
=
await
'
//form[@id="main-post-form"]/div/textArea
'
;
let
commentArea
=
await
findByXpath
(
commentXpath
);
let
commentArea
=
await
findByXpath
(
commentXpath
);
await
commentArea
.
sendKeys
(
buildNumber
);
await
commentArea
.
sendKeys
(
profileComment
);
await
clickXpath
(
'
//div[@class="button small"]/a[contains(text(), "Post")]
'
);
await
clickXpath
(
'
//div[@class="button small"]/a[contains(text(), "Post")]
'
);
// reload page
// reload page
...
@@ -107,8 +115,8 @@ describe('comment tests', async () => {
...
@@ -107,8 +115,8 @@ describe('comment tests', async () => {
// leave the comment
// leave the comment
let
commentBox
=
await
findByXpath
(
'
//textArea[@name="compose-comment"]
'
);
let
commentBox
=
await
findByXpath
(
'
//textArea[@name="compose-comment"]
'
);
await
commentBox
.
sendKeys
(
buildNumber
);
await
commentBox
.
sendKeys
(
studioComment
);
await
findByXpath
(
`//textarea[contains(text(), "
${
buildNumber
}
")]`
);
await
findByXpath
(
`//textarea[contains(text(), "
${
studioComment
}
")]`
);
await
clickXpath
(
'
//button[@class="button compose-post"]
'
);
await
clickXpath
(
'
//button[@class="button compose-post"]
'
);
// reload the page
// reload the page
...
...
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