Add studio comment reply integration test

This commit is contained in:
BryceLTaylor 2021-10-29 16:18:18 -04:00
parent aa594a48fc
commit bf9b14633f

View file

@ -40,6 +40,7 @@ let profileComment = buildNumber + ' profile';
let studioComment = buildNumber + ' studio';
let projectReply = projectComment + ' reply';
let studioReply = studioComment + ' reply';
if (remote) {
jest.setTimeout(60000);
@ -282,5 +283,30 @@ describe('comment tests', async () => {
let commentVisible = await postedReply.isDisplayed();
await expect(commentVisible).toBe(true);
});
test('studio: reply to comment', async () => {
await driver.get(studioUrl);
// find the comment and click reply
let commentXpath = `//span[contains(text(), "${studioComment}")]/../..`;
await clickXpath(commentXpath + '//span[@class = "comment-reply"]');
// type reply
let replyRow = '//div[contains(@class, "comment-reply-row")]';
let replyComposeXpath = replyRow + '//textArea[@class = "inplace-textarea"]';
let composeBox = await findByXpath(replyComposeXpath);
await composeBox.sendKeys(studioReply);
// click post
let postButton = await findByXpath(replyRow + '//button[@class = "button compose-post"]');
await postButton.click();
// find reply
await driver.sleep(500);
await driver.get(studioUrl);
let postedReply = await findByXpath(`//span[contains(text(), "${studioReply}")]`);
let commentVisible = await postedReply.isDisplayed();
await expect(commentVisible).toBe(true);
});
});
});