addAndDeleteCommAsUser
setTimeout 120000
open /nuxeo/logout
type username jdoe
type password jdoe1
clickAndWait Submit
clickAndWait link=DAM
watchA4jRequests
click link=P-01.pdf
waitForA4jRequest 10000
verifyTextPresent Comments
watchA4jRequests
click //*[@id='navigation:assetView:commentButtonsPanel']/xhtml:span[2]/xhtml:a Add
waitForA4jRequest 10000
verifyTextPresent All documents
type //*[@id='navigation:assetView:commentPanel']/xhtml:div[2]/xhtml:div[1]/xhtml:textarea comment added by jdoe
watchA4jRequests
click //*[@id='navigation:assetView:commentButtonsPanel']/xhtml:span[1]/xhtml:a
waitForA4jRequest 10000
watchA4jRequests
click //*[@id='navigation:assetView:commentButtonsPanel']/xhtml:span[2]/xhtml:a Add
waitForA4jRequest 10000
type //*[@id='navigation:assetView:commentPanel']/xhtml:div[2]/xhtml:div[1]/xhtml:textarea text to be canceled
watchA4jRequests
click //*[@id='navigation:assetView:commentButtonsPanel']/xhtml:span[1]/xhtml:a[2]
waitForA4jRequest 10000
verifyTextPresent comment added by jdoe
verifyTextNotPresent text to be canceled
watchA4jRequests
click //*[@id='navigation:assetView:commentPanel']/xhtml:div[2]/xhtml:div/xhtml:div/xhtml:div/xhtml:div[2]/xhtml:a
waitForA4jRequest 10000
open /nuxeo/logout