Skip to content

Commit

Permalink
Update test case to verify the right version in CodeQuarkus
Browse files Browse the repository at this point in the history
This change is kind of expected as CodeQuarkus frontend has been refactored and the new platform focuses on streams ID (2.2) instead of the dependency version.
However, the dependency version is still present in the div title.
  • Loading branch information
Sgitario committed Sep 15, 2021
1 parent 21d99c5 commit 04a57df
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* Tests for checking presence of element on webpage
Expand All @@ -41,7 +41,7 @@ public class CodeQuarkusSiteTest {
public static final String elementIconByXpath = "//link[@rel=\"shortcut icon\"][@href=\"https://www.redhat.com/misc/favicon.ico\"]";
public static final String elementRedHatLogoByXpath= "//img[@class=\"logo\"][@alt=\"Red Hat Logo\"]";
public static final String elementSupportedFlagByXpath = "//a[@class=\"extension-tag supported\"]";
public static final String elementQuarkusPlatformVersionByXpath = "normalize-space(//div[@class=\"quarkus-version\"]/span/text()[last()])";
public static final String elementQuarkusPlatformVersionByXpath = "normalize-space(//div[@class=\"current-quarkus-stream\"]/@title)";

private WebClient webClient;

Expand Down Expand Up @@ -111,7 +111,7 @@ public void validateQuarkusVersionMatch(TestInfo testInfo) throws Exception{
String quarkusPlatformVersionFromWeb = page.getFirstByXPath(elementQuarkusPlatformVersionByXpath);

assertNotNull(quarkusPlatformVersionFromWeb, "Element: " + elementQuarkusPlatformVersionByXpath + " is missing!");
assertEquals(quarkusPlatformVersion, quarkusPlatformVersionFromWeb,
assertTrue(quarkusPlatformVersionFromWeb.contains(quarkusPlatformVersion),
"Quarkus versions doesn't match. Found on the web: " + quarkusPlatformVersionFromWeb + ". Expected: " + quarkusPlatformVersion);
}

Expand Down

0 comments on commit 04a57df

Please sign in to comment.