Examples of SWTBotTree


Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

     *      the tree associated with the 'Servers' view
     */
    private SWTBotTree getServersTree()
    {
        view.show();
        SWTBotTree tree = view.bot().tree();
        return tree;
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

     * @return
     *      the servers count found in the 'Servers' view
     */
    public int getServersCount()
    {
        SWTBotTree tree = getServersTree();
        if ( tree != null )
        {
            return tree.rowCount();
        }

        return 0;
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

    public void testExportImportLdifWithGermanUmlautInDN() throws Exception
    {
        URL url = Platform.getInstanceLocation().getURL();
        final String file = url.getFile() + "ImportExportTest.ldif";

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );

        SWTBotUtils.selectEntry( eBot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
            "cn=Wolfgang K\u00f6lbel" );

        // export LDIF
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

    public void testExportImportDsmlWithGermanUmlautInDN() throws Exception
    {
        URL url = Platform.getInstanceLocation().getURL();
        final String file = url.getFile() + "ImportExportTest.dsml";

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );

        SWTBotUtils.selectEntry( eBot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
            "cn=Wolfgang K\u00f6lbel" );

        // export DSML
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

     *             the exception
     */
    @Test
    public void testImportContextEntryRefreshesRootDSE() throws Exception
    {
        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );

        // add a new partition
        Partition partition = new JdbmPartition();
        partition.setId( "example" );
        partition.setSuffix( "dc=example,dc=com" );
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

        String destFile = url.getFile() + "ImportDontUpdateUiTest.ldif";
        InputStream is = getClass().getResourceAsStream( "ImportExportTest_ImportDontUpdateUI.ldif" );
        String ldifContent = IOUtils.toString( is );
        FileUtils.writeStringToFile( new File( destFile ), ldifContent );

        SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );
        SWTBotUtils.selectEntry( eBot, browserTree, true, "DIT", "Root DSE", "ou=system", "ou=users" );

        long fireCount0 = EventRegistry.getFireCount();

        // import the LDIF
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

        IBrowserConnection browserConnection1 = browserConnectionManager.getBrowserConnectionByName( "SearchTest1" );
        IBrowserConnection browserConnection2 = browserConnectionManager.getBrowserConnectionByName( "SearchTest2" );
        assertEquals( 0, browserConnection1.getSearchManager().getSearches().size() );
        assertEquals( 0, browserConnection2.getSearchManager().getSearches().size() );

        SWTBotTree connectionsTree = SWTBotUtils.getConnectionsTree( bot );
        SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );

        // create a search for in connection 1
        connectionsTree.select( "SearchTest1" );
        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system" );
        ContextMenuHelper.clickContextMenu( browserTree, "New", "New Search..." );
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

     *             the exception
     */
    @Test
    public void testAddEditDeleteAttribute() throws Exception
    {
        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
            "cn=Barbara Jensen" );

        final SWTBotTree entryEditorTree = SWTBotUtils.getEntryEditorTree( bot, "cn=Barbara Jensen,ou=users,ou=system" );
        entryEditorTree.setFocus();

        // add description attribute
        entryEditorTree.contextMenu( "New Attribute..." ).click();
        bot.comboBoxWithLabel( "Attribute type:" ).setText( "description" );
        bot.button( "Finish" ).click();
        bot.text( "" ).setText( "This is the 1st description." );
        entryEditorTree.getTreeItem( "objectClass" ).click();

        // add second value
        entryEditorTree.getTreeItem( "description" ).click();
        entryEditorTree.contextMenu( "New Value" ).click();
        bot.text( "" ).setText( "This is the 2nd description." );
        entryEditorTree.getTreeItem( "objectClass" ).click();

        // edit second value
        entryEditorTree.select( 7 );
        entryEditorTree.contextMenu( "Edit Value" ).click();
        bot.text( "This is the 2nd description." ).setText( "This is the 3rd description." );
        entryEditorTree.getTreeItem( "objectClass" ).click();

        // delete second value
        entryEditorTree.select( 7 );
        entryEditorTree.contextMenu( "Delete Value" ).click();
        bot.shell( "Delete Value" );
        bot.button( "OK" ).click();

        // edit 1st value
        entryEditorTree.select( 6 );
        entryEditorTree.contextMenu( "Edit Value" ).click();
        bot.text( "This is the 1st description." ).setText( "This is the final description." );
        entryEditorTree.getTreeItem( "objectClass" ).click();

        // delete 1st value/attribute
        entryEditorTree.select( 6 );
        entryEditorTree.contextMenu( "Delete Value" ).click();
        bot.shell( "Delete Value" );
        bot.button( "OK" ).click();
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

     *             the exception
     */
    @Test
    public void testDnValueEditor() throws Exception
    {
        SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
            "cn=\\#\\\\\\+\\, \\\"\u00F6\u00E9\\\"" );
        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=groups", "cn=My Group" );

        SWTBotTree entryEditorTree = SWTBotUtils.getEntryEditorTree( bot, "cn=My Group,ou=groups,ou=system" );
        entryEditorTree.setFocus();
        entryEditorTree.contextMenu( "New Attribute..." ).click();
        bot.shell( "New Attribute" );
        bot.comboBoxWithLabel( "Attribute type:" ).setText( "member" );
        bot.button( "Finish" ).click();

        // DN Editor automatically opened
        bot.shell( "DN Editor" );
        bot.button( "Browse..." ).click();

        // select value from DN picker
        bot.shell( "Select DN" );
        SWTBotTree tree = bot.tree( 0 );
        SWTBotUtils.selectEntry( bot, tree, false, "Root DSE", "ou=system", "ou=users",
            "cn=\\#\\\\\\+\\, \\\"\u00F6\u00E9\\\"" );
        bot.button( "OK" ).click();

        // assert value after selection
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

    }


    private SWTBotTreeItem getEntry( String... path )
    {
        SWTBotTree browserTree = getBrowserTree();
        List<String> pathList = new ArrayList<String>( Arrays.asList( path ) );
        SWTBotTreeItem entry = null;

        while ( !pathList.isEmpty() )
        {
            String node = pathList.remove( 0 );

            if ( entry == null )
            {
                node = adjustNodeName( browserTree, node );
                entry = browserTree.getTreeItem( node );
            }
            else
            {
                // adjust current path, because the label is decorated with the
                // number of children
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.