Test_SNF_KS_20_ksdemo_UserSettingInAnswers
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
echo -Add question for user testing test-
open /portal/private/intranet/answers
waitForElementPresent link=Submit question
click link=Submit question
waitForTextPresent Question
type QuestionTitle Question in English
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
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
click //option[@value='French']
type QuestionTitle Question in French
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
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
waitForTextPresent French Description
verifyTextPresent French Description
click link=English
waitForTextPresent Question in English
verifyTextPresent Question in English
waitForTextPresent English Description
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
waitForElementPresent description
type description SNF_KS_20 des
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=SNF_KS_20
verifyElementPresent link=SNF_KS_20
echo -Watch Category-
waitForElementPresent link=SNF_KS_20
mouseOver link=SNF_KS_20
contextMenu link=SNF_KS_20
clickAt link=Watch
waitForText //div[2]/div[3]/div/div/div/div/div[2] You are watching this category, you will be notified about all changes.
verifyText //div[2]/div[3]/div/div/div/div/div[2] 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
click //tr[4]/td[2]/div
waitForElementPresent UIUserWatchManager
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
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
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
verifyTextPresent XQuestion for sort
echo -Delete data-
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
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
mouseOver link=SNF_KS_20
contextMenu link=SNF_KS_20
clickAt link=Delete
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_20
verifyTextNotPresent SNF_KS_20
echo -Reset User Settings-
waitForElementPresent link=Settings
click link=Settings
waitForElementPresent order-by
select order-by label=Created date
waitForElementPresent order-type
select order-type label=Ascending
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Logout
click link=Logout
waitForTextPresent Sign in