Skip to content

Commit

Permalink
Adjust code.quarkus site tests to the new layout with presets
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rsvoboda authored and jedla97 committed Oct 30, 2024
1 parent 2bc61a6 commit fff5ec7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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\"]";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fff5ec7

Please sign in to comment.