Skip to content

Commit

Permalink
Bump jsoup from 38b4d372d4 to f97e0b9bfa (#5211)
Browse files Browse the repository at this point in the history
  • Loading branch information
valfirst authored Jul 15, 2024
1 parent ad9f4ac commit a82b2b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion vividus-plugin-html/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project.description = 'VIVIDUS plugin for HTML testing'

dependencies {
api(group: 'com.github.vividus-framework', name: 'jsoup', version: '38b4d372d4')
api(group: 'com.github.vividus-framework', name: 'jsoup', version: 'f97e0b9bfa')

implementation project(':vividus-engine')
implementation project(':vividus-soft-assert')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.jbehave.core.model.ExamplesTable;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Selector.SelectorParseException;
import org.vividus.html.HtmlLocatorType;
import org.vividus.html.JsoupUtils;
import org.vividus.http.HttpMethod;
Expand Down Expand Up @@ -163,7 +162,7 @@ private Optional<WebPageResourceValidation> parseElement(Element element, boolea
return Optional.empty();
}

String elementCssSelector = getCssSelector(element);
String elementCssSelector = element.cssSelector();
if (elementUriAsString.isEmpty())
{
return Optional.of(ResourceValidationError.EMPTY_HREF_SRC
Expand Down Expand Up @@ -247,18 +246,6 @@ private static String getElementUri(Element element)
return element.attr("src");
}

private String getCssSelector(Element element)
{
try
{
return element.cssSelector();
}
catch (SelectorParseException exception)
{
return String.format("Unable to build CSS selector for '%s' element", element.tagName());
}
}

private URI resolveUri(String uri) throws URISyntaxException
{
URI uriToCheck = new URI(uri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void shouldCheckDesiredResourcesAndPostAttachment() throws InterruptedException,
validate(resourceValidations, imageUri, "#image", CheckStatus.PASSED, N_A);
validate(resourceValidations, EXTERNAL_SECTION_LINK, EXTERNAL_SECTION_LINK_SELECTOR, CheckStatus.PASSED,
N_A);
validate(resourceValidations, gifImageUri, "Unable to build CSS selector for 'img' element",
validate(resourceValidations, gifImageUri, "html > body > img.image.\\(gif\\)",
CheckStatus.PASSED, N_A);
validate(resourceValidations,
URI.create("https://images.ctfassets.net/us_cool_mint_pocketpaks_breath_strips.png"),
Expand Down

0 comments on commit a82b2b9

Please sign in to comment.