From fff5ec71d5dc253964cc545ff2baac7b699736d6 Mon Sep 17 00:00:00 2001 From: Rostislav Svoboda Date: Wed, 30 Oct 2024 09:47:32 +0100 Subject: [PATCH] Adjust code.quarkus site tests to the new layout with presets https://code.quarkus.redhat.com was updated to have presets New pageLoadedSelector was identified to work with old and new version validatePresenceOfSupportedFlags now checks grpc extension URL because the default page has presets without a visible list of extensions --- .../java/io/quarkus/ts/startstop/CodeQuarkusSiteTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusSiteTest.java b/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusSiteTest.java index 8cd097f..5b297a8 100644 --- a/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusSiteTest.java +++ b/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusSiteTest.java @@ -40,7 +40,7 @@ public class CodeQuarkusSiteTest { private static final Logger LOGGER = Logger.getLogger(CodeQuarkusSiteTest.class.getName()); - public static final String pageLoadedSelector = ".extension-category"; + public static final String pageLoadedSelector = ".project-extensions"; public static final String webPageUrl = Commands.getCodeQuarkusURL("https://code.quarkus.redhat.com/"); public static final String elementTitleByText = "Quarkus - Start coding with code.quarkus.redhat.com"; public static final String elementIconByXpath = "//link[@rel=\"shortcut icon\"][@href=\"https://www.redhat.com/favicon.ico\"]"; @@ -95,10 +95,10 @@ public void validatePresenceOfRedHatLogo(TestInfo testInfo) { @Test public void validatePresenceOfSupportedFlags(TestInfo testInfo) { - Page page = loadPage(webPageUrl, 60); + Page page = loadPage(webPageUrl + "/?e=grpc", 60); LOGGER.info("Trying to find element: " + elementSupportedFlagByXpath); Locator supportedExtensions = page.locator(elementSupportedFlagByXpath); - assertTrue(supportedExtensions.count() > 1, "Element: " + elementSupportedFlagByXpath + " is missing!"); + assertTrue(supportedExtensions.count() >= 1, "Element: " + elementSupportedFlagByXpath + " is missing!"); } @Test