Package org.apache.directory.studio.test.integration.ui.bots

Examples of org.apache.directory.studio.test.integration.ui.bots.SearchResultEditorBot


        dialogBot.setFilter( "(uid=admin)" );
        dialogBot.setReturningAttributes( "objectClass, uid, description" );
        dialogBot.clickSearchButton();
        browserViewBot.selectEntry( "Searches", "Search Admin" );

        SearchResultEditorBot srEditorBot = studioBot.getSearchResultEditorBot( "Search Result Editor" );
        srEditorBot.activate();
        assertTrue( srEditorBot.isEnabled() );

        // assert that description attribute is empty
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "", srEditorBot.getContent( 1, 4 ) );

        // add description
        List<Modification> modifications = new ArrayList<Modification>();
        modifications.add( new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultClientAttribute(
            "description", "The 1st description." ) ) );
        ldapServer.getDirectoryService().getAdminSession().modify( new LdapDN( "uid=admin,ou=system" ), modifications );

        // refresh the search, using the toolbar icon
        srEditorBot.refresh();
        SWTUtils.sleep( 1000 );

        // assert the description attribute value is displayed now
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "The 1st description.", srEditorBot.getContent( 1, 4 ) );
    }
View Full Code Here


        dialogBot.setFilter( "(uid=admin)" );
        dialogBot.setReturningAttributes( "objectClass, uid, description" );
        dialogBot.clickSearchButton();
        browserViewBot.selectEntry( "Searches", "Search Admin" );

        SearchResultEditorBot srEditorBot = studioBot.getSearchResultEditorBot( "Search Admin" );
        srEditorBot.activate();
        assertTrue( srEditorBot.isEnabled() );

        // assert that description attribute is empty
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "", srEditorBot.getContent( 1, 4 ) );

        // add description
        ModifyRequest request = new ModifyRequestImpl();
        request.setName( new Dn( "uid=admin,ou=system" ) );
        request.replace( "description", "The 1st description." );
        ldapServer.getDirectoryService().getAdminSession().modify( request );

        // refresh the search, using the toolbar icon
        srEditorBot.refresh();
        SWTUtils.sleep( 1000 );

        // assert the description attribute value is displayed now
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "The 1st description.", srEditorBot.getContent( 1, 4 ) );
    }
View Full Code Here

        dialogBot.setFilter( "(uid=admin)" );
        dialogBot.setReturningAttributes( "objectClass, uid, description" );
        dialogBot.clickSearchButton();
        browserViewBot.selectEntry( "Searches", "Search Admin" );

        SearchResultEditorBot srEditorBot = studioBot.getSearchResultEditorBot( "Search Admin" );
        srEditorBot.activate();
        assertTrue( srEditorBot.isEnabled() );

        // assert that description attribute is empty
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "", srEditorBot.getContent( 1, 4 ) );

        // add description
        List<Modification> modifications = new ArrayList<Modification>();
        modifications.add( new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultClientAttribute(
            "description", "The 1st description." ) ) );
        ldapServer.getDirectoryService().getAdminSession().modify( new LdapDN( "uid=admin,ou=system" ), modifications );

        // refresh the search, using the toolbar icon
        srEditorBot.refresh();
        SWTUtils.sleep( 1000 );

        // assert the description attribute value is displayed now
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "The 1st description.", srEditorBot.getContent( 1, 4 ) );
    }
View Full Code Here

        dialogBot.setFilter( "(uid=admin)" );
        dialogBot.setReturningAttributes( "objectClass, uid, description" );
        dialogBot.clickSearchButton();
        browserViewBot.selectEntry( "Searches", "Search Admin" );

        SearchResultEditorBot srEditorBot = studioBot.getSearchResultEditorBot( "Search Admin" );
        srEditorBot.activate();
        assertTrue( srEditorBot.isEnabled() );

        // assert that description attribute is empty
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "", srEditorBot.getContent( 1, 4 ) );

        // add description
        ModifyRequest request = new ModifyRequestImpl();
        request.setName( new Dn( "uid=admin,ou=system" ) );
        request.replace( "description", "The 1st description." );
        ldapServer.getDirectoryService().getAdminSession().modify( request );

        // refresh the search, using the toolbar icon
        srEditorBot.refresh();
        SWTUtils.sleep( 1000 );

        // assert the description attribute value is displayed now
        assertEquals( "uid=admin,ou=system", srEditorBot.getContent( 1, 1 ) );
        assertEquals( "The 1st description.", srEditorBot.getContent( 1, 4 ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.test.integration.ui.bots.SearchResultEditorBot

Copyright © 2018 www.massapicom. 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.