@@ -71,7 +71,7 @@ public class EtmBaseTest {
7171
7272 protected String tormUrl = "http://172.17.0.1:37000/" ; // local by default
7373 protected String secureTorm = "http://user:pass@172.17.0.1:37000/" ;
74- protected static final String TSS_PAGE_SUFFIX = "#/support-services" ;
74+ protected static final String TSS_PAGE_SUFFIX = "#/support-services" ;
7575 protected String apiPath = "api" ;
7676 protected String tormApiUrl ;
7777 protected String eUser = null ;
@@ -183,8 +183,8 @@ protected void navigateToTorm(WebDriver driver) {
183183
184184 protected void navigateToRoot (WebDriver driver ) {
185185 log .info ("Navigating to Root Path (/)" );
186- driver .findElement (By . xpath (
187- "//*[@id=\\ \" main_nav\\ \" ]/div/mat-toolbar/span" ))
186+ driver .findElement (
187+ By . xpath ( "//*[@id=\\ \" main_nav\\ \" ]/div/mat-toolbar/span" ))
188188 .click ();
189189 }
190190
@@ -302,7 +302,7 @@ protected WebElement getElementByXpath(WebDriver driver, String xpath,
302302 } catch (InterruptedException e ) {
303303 log .error ("Time Slot between actions interrupted." );
304304 }
305-
305+
306306 WebElement element = getElementsByXpath (driver , xpath , secondsTimeout )
307307 .get (0 );
308308 if (withScroll ) {
@@ -420,7 +420,7 @@ protected void navigateToETProject(WebDriver driver, String projectName) {
420420 }
421421
422422 protected boolean etProjectExists (WebDriver driver , String projectName ) {
423- navigateToProjects (driver );
423+ navigateToProjects (driver );
424424 log .info ("Checking if Project {} exists" , projectName );
425425 String projectsTableXpath = getProjectsTableXpathFromProjectPage ();
426426
@@ -635,7 +635,7 @@ protected boolean etSutExistsIntoTLProject(WebDriver driver,
635635 protected void selectItem (WebDriver driver , String item ,
636636 String selectDesc ) {
637637 String sutSelectXpath = "//*[@placeholder='" + selectDesc + "']" ;
638-
638+
639639 this .getElementByXpath (driver , sutSelectXpath ).click ();
640640
641641 if (item != null ) {
@@ -751,20 +751,28 @@ protected void createNewTJob(WebDriver driver, String tJobName,
751751 String testResultPath , String sutName , String dockerImage ,
752752 boolean imageCommands , String commands ,
753753 Map <String , String > parameters , Map <String , List <String >> tssMap ,
754- Map <String , List <String >> multiConfigurations ) {
754+ Map <String , List <String >> multiConfigurations ,
755+ Integer maxExecutions ) {
755756 log .info ("Wait for the \" New TJob\" button" );
756757 getElementById (driver , "newTJobBtn" ).click ();
757758
758759 log .info ("Creating TJob..." );
759760 WebDriverWait waitService2 = new WebDriverWait (driver , 20 ); //
760- By serviceFieldTJobName = By .name ("tJobName" );
761- waitService2 .until (visibilityOfElementLocated (serviceFieldTJobName ));
762- driver .findElement (serviceFieldTJobName ).sendKeys (tJobName );
761+ By tJobNameField = By .name ("tJobName" );
762+ waitService2 .until (visibilityOfElementLocated (tJobNameField ));
763+ driver .findElement (tJobNameField ).sendKeys (tJobName );
763764
764765 if (testResultPath != null ) {
765766 driver .findElement (By .name ("resultsPath" )).sendKeys (testResultPath );
766767 }
767768
769+ if (maxExecutions == null ) {
770+ maxExecutions = 5 ;
771+ }
772+
773+ driver .findElement (By .name ("maxExecutions" ))
774+ .sendKeys (maxExecutions + "" );
775+
768776 // Select SuT
769777 String sutSelectXpath = "//mat-select/div/div/span[contains(string(), 'Select a SuT')]" ;
770778 this .getElementByXpath (driver , sutSelectXpath ).click ();
@@ -900,7 +908,7 @@ protected void startTestSupportService(WebDriver driver,
900908
901909 log .info ("Create and wait for instance" );
902910 getElementById (driver , "create_instance" ).click ();
903-
911+
904912 log .info ("Navigate for instance view" );
905913 getElementByXpath (driver , "//button[@title='View Service Detail']" , 240 )
906914 .click ();
@@ -991,6 +999,7 @@ public List<WebElement> findElements(
991999 return null ;
9921000 }
9931001 }
1002+
9941003 public void setupTestBrowser (TestInfo testInfo , BrowserType browser ,
9951004 WebDriver driver ) throws MalformedURLException {
9961005 setupTestBrowser (testInfo , browser , "latest" , driver );
@@ -1012,7 +1021,7 @@ public void setupTestBrowser(TestInfo testInfo, BrowserType browser,
10121021 caps .setBrowserName ("firefox" );
10131022 }
10141023 caps .setCapability ("testName" , testName );
1015- if (!browserVersion .equals (BROWSER_VERSION_LATEST )){
1024+ if (!browserVersion .equals (BROWSER_VERSION_LATEST )) {
10161025 log .info ("Use this browser version: {}" , browserVersion );
10171026 caps .setVersion (browserVersion );
10181027 }
@@ -1029,7 +1038,7 @@ public void sleep(long millis) {
10291038 } catch (InterruptedException e ) {
10301039 }
10311040 }
1032-
1041+
10331042 protected void deleteTSSInstance (WebDriver driver ) {
10341043 WebElement tssId = getElementByXpath (driver ,
10351044 "//*[@id=\" tss-instances\" ]/div/table/tbody/tr[1]/td[1]/div/span" );
0 commit comments