Test_SNF_KS_16_ksdemo_ManageCommentInQuestion
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/answers
echo -Add Category-
waitForElementPresent //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent link=Add category
clickAt link=Add category
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_16
waitForElementPresent description
type description SNF_KS_16 des
waitForElementPresent link=Save
click link=Save
echo -Add Question -
waitForElementPresent link=SNF_KS_16
click link=SNF_KS_16
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle SNF_KS_16 English
type EmailAddress root@localhost.vn
select AllLanguages label=French
click //option[@value='French']
waitForElementPresent QuestionTitle
type QuestionTitle SNF_KS_16 French
waitForElementPresent link=Save
mouseDown link=Save
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -Comment Question-
waitForElementPresent link=SNF_KS_16 English
click link=SNF_KS_16 English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in English
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=French
click link=French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in French
selectFrame relative=top
waitForElementPresent //form[@id='UICommentForm']//a[text()="Save"]
click //form[@id='UICommentForm']//a[text()="Save"]
echo -Edit Comment-
waitForElementPresent link=English
click link=English
waitForTextPresent Comment in English
verifyTextPresent Comment in English
echo -Edit comment English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in English Update
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForTextPresent Comment in English Update
verifyTextPresent Comment in English Update
waitForElementPresent link=French
click link=French
echo -Edit comment French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in French Update
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForTextPresent Comment in French Update
verifyTextPresent Comment in French Update
echo -Delete Comment-
waitForElementPresent link=English
click link=English
waitForTextPresent Comment in English Update
verifyTextPresent Comment in English Update
echo -Delete comment French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
assertConfirmation Are you sure you want to delete this comment ?
waitForTextNotPresent Comment in English Update
verifyTextNotPresent Comment in English Update
waitForElementPresent link=French
click link=French
echo -Delete comment French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
assertConfirmation Are you sure you want to delete this comment ?
waitForTextNotPresent Comment in French Update
verifyTextNotPresent Comment in French Update
echo -Comment Question for Promote Test-
waitForElementPresent link=English
click link=English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in English
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=French
click link=French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in French
selectFrame relative=top
waitForElementPresent //form[@id='UICommentForm']//a[text()="Save"]
click //form[@id='UICommentForm']//a[text()="Save"]
echo -Promote Comment-
waitForElementPresent link=English
click link=English
waitForTextPresent Comment in English
verifyTextPresent Comment in English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
waitForTextNotPresent No one has answered to that question.
verifyTextNotPresent No one has answered to that question.
click link=French
waitForTextPresent Comment in French
verifyTextPresent Comment in French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
waitForTextNotPresent No one has answered to that question.
verifyTextNotPresent No one has answered to that question.
echo - Delete data-
waitForElementPresent //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[4]/a
click //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[4]/a
waitForElementPresent //form[@id='UIDeleteQuestion']//table[@class='ActionContainer']//div
click //form[@id='UIDeleteQuestion']//table[@class='ActionContainer']//div
waitForTextNotPresent SNF_KS_16 English
verifyTextNotPresent SNF_KS_16 English
echo -Delete Category Test-
waitForElementPresent //img[@alt='categories']
click //img[@alt='categories']
waitForElementPresent //a[@title="SNF_KS_16"]
contextMenu //a[@title="SNF_KS_16"]
clickAt link=Delete
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_16
verifyTextNotPresent SNF_KS_16
waitForElementPresent link=Logout
clickAndWait link=Logout
waitForTextPresent Sign in