From 2c73ced214887bc37f02ffab4e25fad173bc21a0 Mon Sep 17 00:00:00 2001 From: Joshua Rodriguez Date: Tue, 24 Sep 2024 08:38:42 -0700 Subject: [PATCH] Fixes more tests cases for bootstrap upgrade --- .../cws/test/integration/ui/DeploymentsTestIT.java | 2 +- .../jpl/cws/test/integration/ui/HistoryTestIT.java | 2 +- .../cws/test/integration/ui/InitiatorsTestIT.java | 4 ++-- .../jpl/cws/test/integration/ui/LogsTestIT.java | 13 +++++++------ 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/DeploymentsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/DeploymentsTestIT.java index 8cff5e20..306ea3b4 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/DeploymentsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/DeploymentsTestIT.java @@ -89,7 +89,7 @@ public void processCompletedTest() throws IOException { String color = driver.findElement(By.className("progress-bar-success")).getCssValue("background-color"); log.info(color); - if (color.equals("rgba(13, 110, 253, 1)")) { //color = blue + if (color.equals("rgba(0, 128, 0, 1)")) { scriptPass = true; testCasesCompleted++; } diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java index 1888a4ba..a593f45b 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java @@ -76,7 +76,7 @@ public void runResultsTest() throws IOException { scrollTo(historyButton); historyButton.click(); - findOnPage("CWS - History"); + findOnPage("History"); WebElement hideLineCheckbox = findElByXPath("//input[@id='showall']"); waitForElement(hideLineCheckbox); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java index 3a02b5b4..29150c82 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java @@ -184,7 +184,7 @@ public void runStartInitiatorTest() throws IOException { sleep(1000); screenShot("InitiatorTestIT-runStartInitiatorTestColor"); - if (color.equals("rgba(13, 110, 253, 1)")) { //color = blue + if (color.equals("rgba(0, 128, 0, 1)")) { scriptPass = true; testCasesCompleted++; } @@ -331,7 +331,7 @@ public void runCronInitiatorTest() throws IOException { String color = driver.findElement(By.className("progress-bar-success")).getCssValue("background-color"); log.info(color); - if (color.equals("rgba(13, 110, 253, 1)")) { //color = blue + if (color.equals("rgba(0, 128, 0, 1)")) { scriptPass = true; procCounter = procCounter + 2; testCasesCompleted++; diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/LogsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/LogsTestIT.java index f684c7fd..ad409df0 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/LogsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/LogsTestIT.java @@ -117,27 +117,28 @@ public void runTableColumnTest() throws IOException { findElByXPath("//div[@id='logData_wrapper']/div/div/div/button/span").click(); log.info("Checking CWS Host."); - findElByXPath("//a[text()='CWS Host']").click(); + findElByXPath("//button/span[text()='CWS Host']").click(); sleep(1000); log.info("Checking CWS Worker ID."); - findElByXPath("//a[text()='CWS Worker ID']").click(); + findElByXPath("//button/span[text()='CWS Worker ID']").click(); sleep(1000); log.info("Checking ProcDefKey."); - findElByXPath("//a[text()='Proc Def Key']").click(); + findElByXPath("//button/span[text()='Proc Def Key']").click(); sleep(1000); log.info("Checking ProcInstId."); - findElByXPath("//a[text()='Proc Inst ID']").click(); + findElByXPath("//button/span[text()='Proc Inst ID']").click(); sleep(1000); - wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.tagName("table"))); + // wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.tagName("table"))); WebElement myTable = driver.findElement(By.tagName("table")); log.info("Checking data from table to ensure all checkboxes were clicked: " + myTable.getText()); + log.info(myTable.getText()); - if (myTable.getText().contains("Time Stamp CWS Host CWS Worker ID Log Level Thread Name Proc Def Key Proc Inst ID Message")) { + if (myTable.getText().contains("Time Stamp\nCWS Host\nCWS Worker ID\nLog Level\nThread Name\nProc Def Key\nProc Inst ID\nMessage")) { scriptPass = true; log.info("All checkboxes were successfully checked."); testCasesCompleted++;