From 5bd05c28fc9b04d2272777797b789ae4822baf22 Mon Sep 17 00:00:00 2001 From: Mark Lawrence Date: Mon, 30 Sep 2024 14:07:03 +0100 Subject: [PATCH] add integratedtests logic into IVT itself Signed-off-by: Mark Lawrence --- .../galasa/sdv/manager/ivt/SdvManagerIVT.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java index d6383f238..5c49c204b 100644 --- a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java +++ b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java @@ -10,8 +10,11 @@ import static org.assertj.core.api.Assertions.assertThat; import dev.galasa.BeforeClass; +import dev.galasa.ProductVersion; import dev.galasa.Test; +import dev.galasa.cicsts.CicsRegion; import dev.galasa.cicsts.CicsTerminal; +import dev.galasa.cicsts.ICicsRegion; import dev.galasa.cicsts.ICicsTerminal; import dev.galasa.core.manager.Logger; import dev.galasa.sdv.ISdvUser; @@ -24,6 +27,9 @@ public class SdvManagerIVT { @Logger public Log logger; + @CicsRegion(cicsTag = "SDVIVT") + public ICicsRegion cics; + @CicsTerminal(cicsTag = "SDVIVT") public ICicsTerminal terminal; @@ -40,11 +46,18 @@ public void logIntoTerminals() throws SdvManagerException { @Test public void userUsesCeda() throws Exception { - terminal.type("CEDA DI G(SDVGRP)").enter().waitForTextInField(SDV_TCPIPSERVICE_NAME); + // Only run test if running on CICS 6.2+ + if (!cics.getVersion().isEarlierThan(ProductVersion.v(750))) { + + terminal.type("CEDA DI G(SDVGRP)").enter().waitForTextInField(SDV_TCPIPSERVICE_NAME); - assertThat(terminal.searchText(SDV_TCPIPSERVICE_NAME)) - .as("Expectation to see " + SDV_TCPIPSERVICE_NAME + " in terminal").isTrue(); - terminal.pf3(); + assertThat(terminal.searchText(SDV_TCPIPSERVICE_NAME)) + .as("Expectation to see " + SDV_TCPIPSERVICE_NAME + " in terminal").isTrue(); + terminal.pf3(); + } else { + // Just pass the test if running on earlier CICS versions + assertThat(true).isTrue(); + } } }