Test_SNF_KS_20_defaultportal_UserSettingInAnswers
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
echo -Add question for user testing test-
open /portal/private/intranet/answers
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle Question in English
pause 1000
selectFrame //iframe[@id='Question___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body English Description
selectFrame relative=top
type EmailAddress root@localhost.vn
select AllLanguages label=French
waitForElementPresent //option[@value='French']
click //option[@value='French']
waitForElementPresent QuestionTitle
type QuestionTitle Question in French
pause 1000
selectFrame //iframe[@id='Question___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body French Description
selectFrame relative=top
waitForElementPresent //div[@id="AddQuestion"]//div[@class="UIAction"]//div[@class="ButtonMiddle"]
clickAt //div[@id="AddQuestion"]//div[@class="UIAction"]//div[@class="ButtonMiddle"]
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -View the question in multiple languages-
waitForElementPresent link=Question in English
click link=Question in English
waitForElementPresent link=French
click link=French
waitForTextPresent Question in French
verifyTextPresent Question in French
verifyTextPresent French Description
waitForElementPresent link=English
click link=English
waitForTextPresent Question in English
verifyTextPresent Question in English
verifyTextPresent English Description
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_20_Category 1
waitForElementPresent link=Save
click link=Save
waitForTextPresent SNF_KS_20_Category 1
verifyTextPresent SNF_KS_20_Category 1
echo -Watch Category-
contextMenu //div[@id='AnswersContainer']//a[@title='SNF_KS_20_Category 1']
waitForElementPresent //div[@id='AnswersContainer']/div/div/div[4]/div/div/div/div/div[8]/a
mouseDownRight //div[@id='AnswersContainer']/div/div/div[4]/div/div/div/div/div[8]/a
waitForTextPresent You are watching this category, you will be notified about all changes.
verifyTextPresent You are watching this category, you will be notified about all changes.
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -Set User Settings-
waitForElementPresent link=Settings
click link=Settings
waitForElementPresent order-by
select order-by label=alphabet/Index
waitForElementPresent order-type
select order-type label=Descending
waitForElementPresent vote
click vote
waitForElementPresent //tr[4]/td[2]/div
click //tr[4]/td[2]/div
waitForElementPresent //form[@id='UIUserWatchManager']/div[2]//div[1]//td[2]/div/div
click //form[@id='UIUserWatchManager']/div[2]//div[1]//td[2]/div/div
assertConfirmation Are you sure you want unwatch this category?
waitForElementPresent link=Cancel
click link=Cancel
waitForElementPresent link=Save
click link=Save
echo -Chech Sort-
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle XQuestion for sort
pause 1000
selectFrame //iframe[@id='Question___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body English Description
selectFrame relative=top
type EmailAddress root@localhost.vn
waitForElementPresent //div[@id="AddQuestion"]//div[@class="UIAction"]//div[@class="ButtonMiddle"]
clickAt //div[@id="AddQuestion"]//div[@class="UIAction"]//div[@class="ButtonMiddle"]
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
waitForTextPresent XQuestion for sort
verifyText //div[3]/div/div[1]/div[1]/div[2]/a XQuestion for sort
echo -Delete Question
waitForElementPresent link=XQuestion for sort
click link=XQuestion for sort
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
waitForElementPresent link=Question in English
click link=Question in English
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
echo -Delete category-
waitForElementPresent link=SNF_KS_20_Category 1
click link=SNF_KS_20_Category 1
waitForElementPresent xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent //div[@id='FAQCategroManager']//div[@class='UIRightPopupMenuContainer']/div[3]
clickAt //div[@id='FAQCategroManager']//div[@class='UIRightPopupMenuContainer']/div[3]
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_20_Category 1
verifyTextNotPresent SNF_KS_20_Category 1
clickAndWait link=Logout