From a74bd80499946a9a3dfe50c433b5c613d6cc9018 Mon Sep 17 00:00:00 2001 From: ambarg27 <146844240+ambarg27@users.noreply.github.com> Date: Thu, 21 May 2026 01:29:42 +0530 Subject: [PATCH 1/3] feat: add OCP pre-prod YAML with onpremEnv: ocp-pre-prod Copy of testng_hyperexecute_matrix_sample.yaml with onpremEnv: ocp-pre-prod added for OCP infra job routing. Used by LTQAAutomation OCP test scenarios. Co-Authored-By: Claude Opus 4.6 (1M context) --- ...testng_hyperexecute_matrix_sample_ocp.yaml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 yaml/linux/v1/testng_hyperexecute_matrix_sample_ocp.yaml diff --git a/yaml/linux/v1/testng_hyperexecute_matrix_sample_ocp.yaml b/yaml/linux/v1/testng_hyperexecute_matrix_sample_ocp.yaml new file mode 100644 index 00000000..2e3c55b2 --- /dev/null +++ b/yaml/linux/v1/testng_hyperexecute_matrix_sample_ocp.yaml @@ -0,0 +1,32 @@ +--- +version: 0.1 +runson: ${matrix.os} + +onpremEnv: ocp-pre-prod + +matrix: + tests: ["Test_1"] + browser: ["Chrome"] + version: ["latest"] + os: ["linux"] + +runtime: + language: java + version: 11 + +cacheKey: '{{ checksum "pom.xml" }}' +cacheDirectories: + - .m2 + +pre: + - mvn -Dmaven.repo.local=./.m2 dependency:resolve + +testSuites: + - mvn test -Dplatname=linux -Dmaven.repo.local=./.m2 -DselectedTests=$tests + +parallelism: 1 + +retryOnFailure: true +maxRetries: 1 + +jobLabel: [selenium-testng, linux, matrix, ocp-pre-prod] From ba4094e5873f9b4c7aa6d55249f8765a60f98aa0 Mon Sep 17 00:00:00 2001 From: ambarg27 <146844240+ambarg27@users.noreply.github.com> Date: Fri, 22 May 2026 19:08:44 +0530 Subject: [PATCH 2/3] fix: replace ng-binding selector with xpath for remaining tasks count The new sample-todo-app doesn't have ng-binding class on the remaining tasks span. Use xpath to find the span containing 'tasks remaining' text. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/test/java/Test1.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/Test1.java b/src/test/java/Test1.java index af3d3417..17d8826f 100644 --- a/src/test/java/Test1.java +++ b/src/test/java/Test1.java @@ -135,7 +135,7 @@ public void test1_element_addition_1() throws InterruptedException { driver.findElement(By.xpath(xpath)).click(); Thread.sleep(500); test1.log(Status.PASS, "Item No. " + i + " marked completed"); - By remainingItem = By.className("ng-binding"); + By remainingItem = By.xpath("//span[contains(text(),'tasks remaining')]"); String actualText = driver.findElement(remainingItem).getText(); String expectedText = remaining + " of " + totalCount + " tasks remaining"; @@ -192,7 +192,7 @@ public void test1_element_addition_2() throws InterruptedException, IOException driver.findElement(By.xpath(xpath)).click(); Thread.sleep(500); test2.log(Status.PASS, "Item No. " + i + " marked completed"); - By remainingItem = By.className("ng-binding"); + By remainingItem = By.xpath("//span[contains(text(),'tasks remaining')]"); String actualText = driver.findElement(remainingItem).getText(); String expectedText = remaining + " of " + totalCount + " tasks remaining"; From 4e84e316dfaf60e9d532ad4e073dd25d8b3ab8b1 Mon Sep 17 00:00:00 2001 From: ambarg27 <146844240+ambarg27@users.noreply.github.com> Date: Fri, 22 May 2026 19:53:49 +0530 Subject: [PATCH 3/3] fix: update selectors for new React-based sample-todo-app - Use data-testid='remaining-count' instead of ng-binding/xpath - Update expected text from "X of Y tasks remaining" to "X of Y remaining" - The app migrated from AngularJS to React with new DOM structure Co-Authored-By: Claude Opus 4.6 (1M context) --- src/test/java/Test1.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/Test1.java b/src/test/java/Test1.java index 17d8826f..28a7fd09 100644 --- a/src/test/java/Test1.java +++ b/src/test/java/Test1.java @@ -135,9 +135,9 @@ public void test1_element_addition_1() throws InterruptedException { driver.findElement(By.xpath(xpath)).click(); Thread.sleep(500); test1.log(Status.PASS, "Item No. " + i + " marked completed"); - By remainingItem = By.xpath("//span[contains(text(),'tasks remaining')]"); + By remainingItem = By.cssSelector("[data-testid='remaining-count']"); String actualText = driver.findElement(remainingItem).getText(); - String expectedText = remaining + " of " + totalCount + " tasks remaining"; + String expectedText = remaining + " of " + totalCount + " remaining"; if (!actualText.contains(expectedText)) { test1.log(Status.FAIL, "Wrong Text Description"); @@ -192,9 +192,9 @@ public void test1_element_addition_2() throws InterruptedException, IOException driver.findElement(By.xpath(xpath)).click(); Thread.sleep(500); test2.log(Status.PASS, "Item No. " + i + " marked completed"); - By remainingItem = By.xpath("//span[contains(text(),'tasks remaining')]"); + By remainingItem = By.cssSelector("[data-testid='remaining-count']"); String actualText = driver.findElement(remainingItem).getText(); - String expectedText = remaining + " of " + totalCount + " tasks remaining"; + String expectedText = remaining + " of " + totalCount + " remaining"; if (!actualText.contains(expectedText)) { test2.log(Status.FAIL, "Wrong Text Description");