* @throws Exception the exception
*/
public void testCreatePersonEntry() throws Exception
{
final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
systemNode.expand();
systemNode.expand();
// open "New Entry" wizard
SWTBotMenu contextMenu = browserTree.contextMenu( "New Entry..." );
contextMenu.click();
// select entry creation method
bot.radio( "Create entry from scratch" ).click();
bot.button( "Next >" ).click();
// select object classes
bot.table( 0 ).select( "inetOrgPerson" );
bot.button( "Add" ).click();
bot.button( "Next >" ).click();
// specify DN
SWTBotCombo typeCombo = bot.comboBoxWithLabel( "RDN:" );
typeCombo.setText( "cn" );
SWTBotText valueText = bot.text( "" );
valueText.setText( "testCreatePersonEntry" );
bot.button( "Next >" ).click();
// wait for check that entry doesn't exist yet
bot.waitUntil( new DefaultCondition()
{
public boolean test() throws Exception
{
return bot.tree( 0 ) != null;
}
public String getFailureMessage()
{
return "Could not find widget";
}
} );
// enter sn value
SWTBotTree tree = bot.tree( 0 );
tree.select( "sn" );
bot.text( "" ).setText( "test" );
// click to finish editing of sn
SWTBotTreeItem cnNode = SWTBotUtils.selectNode( bot, tree, "sn" );
cnNode.click();
// click finish to create the entry
bot.button( "Finish" ).click();
// wait till entry is created and selected in the tree