/*
 * 
 * 
 * Copyright (C) 2004 SIPfoundry Inc.
 * Licensed by SIPfoundry under the LGPL license.
 * 
 * Copyright (C) 2004 Pingtel Corp.
 * Licensed to SIPfoundry under a Contributor Agreement.
 * 
 * $
 */
package org.sipfoundry.sipxconfig.site.phone.polycom;

import junit.framework.Test;
import net.sourceforge.jwebunit.WebTestCase;

import org.sipfoundry.sipxconfig.site.SiteTestHelper;
import org.sipfoundry.sipxconfig.site.phone.PhoneTestHelper;
import org.w3c.dom.Element;

public class PasswordSettingTestUi extends WebTestCase {
 
    private PhoneTestHelper m_helper;
    
    public static Test suite() throws Exception {
        return SiteTestHelper.webTestSuite(PasswordSettingTestUi.class);
    }
    
    protected void setUp() throws Exception {
        super.setUp();
        getTestContext().setBaseUrl(SiteTestHelper.getBaseUrl());        
        m_helper = new PhoneTestHelper(tester);
        m_helper.reset();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }
    
    public void testEditSipSetttings() {
        m_helper.seedLine(1);
        clickLink("ManagePhones");        
        clickLinkWithText(SiteTestHelper.TEST_USER);
        clickLinkWithText("Registration");
        Element passwordField = getDialog().getElement("setting:auth.password");        
        assertEquals("password", passwordField.getAttribute("type"));
    }
}

/*
 * 
 * 
 * Copyright (C) 2004 SIPfoundry Inc.
 * Licensed by SIPfoundry under the LGPL license.
 * 
 * Copyright (C) 2004 Pingtel Corp.
 * Licensed to SIPfoundry under a Contributor Agreement.
 * 
 * $
 */
package org.sipfoundry.sipxconfig.site.phone.polycom;

import junit.framework.Test;
import net.sourceforge.jwebunit.WebTestCase;

import org.sipfoundry.sipxconfig.site.SiteTestHelper;
import org.sipfoundry.sipxconfig.site.phone.PhoneTestHelper;
import org.w3c.dom.Element;

public class PasswordSettingTestUi extends WebTestCase {
 
    private PhoneTestHelper m_helper;
    
    public static Test suite() throws Exception {
        return SiteTestHelper.webTestSuite(PasswordSettingTestUi.class);
    }
    
    protected void setUp() throws Exception {
        super.setUp();
        getTestContext().setBaseUrl(SiteTestHelper.getBaseUrl());        
        m_helper = new PhoneTestHelper(tester);
        m_helper.reset();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }
    
    public void testEditSipSetttings() {
        m_helper.seedLine(1);
        SiteTestHelper.setScriptingEnabled(true);
        clickLink("ManagePhones");        
        clickLinkWithText(SiteTestHelper.TEST_USER);
        clickLinkWithText("Registration");
        clickLink("setting:toggle");
        Element passwordField = getDialog().getElement("setting:auth.password");        
        assertEquals("password", passwordField.getAttribute("type"));
    }
}

FIX BUILD: Unit test assumed polycom authid was first visible on page
FIX BUILD: Unit test assumed polycom authid was first visible on page

git-svn-id: f26ccc5efe72c2bd8e1c40f599fe313f2692e4de@7583 a612230a-c5fa-0310-af8b-88eea846685b
