integration/src/test/java/org/pentaho/di/ui/spoon/WebSpoonTest.java
@Test
  public void testConnect() {
    clickElement( "//div[text() = 'Connect']" );
    // if any repository is already registered
    if ( driver.findElements( By.xpath( "//div[text() = 'Repository Manager...']" ) ).size() == 1 ) {
      clickElement( "//div[text() = 'Repository Manager...']" );
      driver.switchTo().frame( driver.findElement( By.xpath(".//iframe[@src='/spoon/osgi/@pentaho/di-plugin-repositories@9.0.0.0-423/index.html']") ) );
    } else {
      driver.switchTo().frame( driver.findElement( By.xpath(".//iframe[@src='/spoon/osgi/@pentaho/di-plugin-repositories@9.0.0.0-423/index.html#/add']") ) );
    }
    assertEquals( 1, driver.findElements( By.xpath( "//button[@id = 'btnClose']" ) ).size() );
  }
/**
   * Test if the repository dialog is loaded.
   * @throws Exception
   */
Test if the repository dialog is loaded.
@throws Exception
Test if the repository dialog is loaded . @throws Exception
@Test
  public void testConnect() {
    clickElement( "//div[text() = 'Connect']" );
    if ( driver.findElements( By.xpath( "//div[text() = 'Repository Manager...']" ) ).size() == 1 ) {
      clickElement( "//div[text() = 'Repository Manager...']" );
      driver.switchTo().frame( driver.findElement( By.xpath(".//iframe[@src='/spoon/osgi/@pentaho/di-plugin-repositories@9.0.0.0-423/index.html']") ) );
    } else {
      driver.switchTo().frame( driver.findElement( By.xpath(".//iframe[@src='/spoon/osgi/@pentaho/di-plugin-repositories@9.0.0.0-423/index.html#/add']") ) );
    }
    assertEquals( 1, driver.findElements( By.xpath( "//button[@id = 'btnClose']" ) ).size() );
  }
@ Test public void testConnect ( ) { clickElement ( "//div[text() = 'Connect']" ) ; if ( driver . findElements ( By . xpath ( "//div[text() = 'Repository Manager...']" ) ) . size ( ) == 1 ) { clickElement ( "//div[text() = 'Repository Manager...']" ) ; driver . switchTo ( ) . frame ( driver . findElement ( By . xpath ( ".//iframe[@src='/spoon/osgi/@pentaho/di-plugin-repositories@9.0.0.0-423/index.html']" ) ) ) ; } else { driver . switchTo ( ) . frame ( driver . findElement ( By . xpath ( ".//iframe[@src='/spoon/osgi/@pentaho/di-plugin-repositories@9.0.0.0-423/index.html#/add']" ) ) ) ; } assertEquals ( 1 , driver . findElements ( By . xpath ( "//button[@id = 'btnClose']" ) ) . size ( ) ) ; }
Test if the repository dialog is loaded.
Test if the repository dialog is loaded .
// if any repository is already registered