Skip to content

Commit a82b2b9

Browse files
authored
Bump jsoup from 38b4d372d4 to f97e0b9bfa (#5211)
1 parent ad9f4ac commit a82b2b9

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

vividus-plugin-html/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project.description = 'VIVIDUS plugin for HTML testing'
22

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

66
implementation project(':vividus-engine')
77
implementation project(':vividus-soft-assert')

vividus-plugin-web-app-to-rest-api/src/main/java/org/vividus/steps/integration/ResourceCheckSteps.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.jbehave.core.model.ExamplesTable;
3939
import org.jsoup.nodes.Document;
4040
import org.jsoup.nodes.Element;
41-
import org.jsoup.select.Selector.SelectorParseException;
4241
import org.vividus.html.HtmlLocatorType;
4342
import org.vividus.html.JsoupUtils;
4443
import org.vividus.http.HttpMethod;
@@ -163,7 +162,7 @@ private Optional<WebPageResourceValidation> parseElement(Element element, boolea
163162
return Optional.empty();
164163
}
165164

166-
String elementCssSelector = getCssSelector(element);
165+
String elementCssSelector = element.cssSelector();
167166
if (elementUriAsString.isEmpty())
168167
{
169168
return Optional.of(ResourceValidationError.EMPTY_HREF_SRC
@@ -247,18 +246,6 @@ private static String getElementUri(Element element)
247246
return element.attr("src");
248247
}
249248

250-
private String getCssSelector(Element element)
251-
{
252-
try
253-
{
254-
return element.cssSelector();
255-
}
256-
catch (SelectorParseException exception)
257-
{
258-
return String.format("Unable to build CSS selector for '%s' element", element.tagName());
259-
}
260-
}
261-
262249
private URI resolveUri(String uri) throws URISyntaxException
263250
{
264251
URI uriToCheck = new URI(uri);

vividus-plugin-web-app-to-rest-api/src/test/java/org/vividus/steps/integration/ResourceCheckStepsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void shouldCheckDesiredResourcesAndPostAttachment() throws InterruptedException,
237237
validate(resourceValidations, imageUri, "#image", CheckStatus.PASSED, N_A);
238238
validate(resourceValidations, EXTERNAL_SECTION_LINK, EXTERNAL_SECTION_LINK_SELECTOR, CheckStatus.PASSED,
239239
N_A);
240-
validate(resourceValidations, gifImageUri, "Unable to build CSS selector for 'img' element",
240+
validate(resourceValidations, gifImageUri, "html > body > img.image.\\(gif\\)",
241241
CheckStatus.PASSED, N_A);
242242
validate(resourceValidations,
243243
URI.create("https://images.ctfassets.net/us_cool_mint_pocketpaks_breath_strips.png"),

0 commit comments

Comments
 (0)