Commit 53b79f64 authored by BryceLTaylor's avatar BryceLTaylor

Use unique comment for each silo using silo name

parent 2c9771a2
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment