Skip to content

Commit f4801d8

Browse files
Merge pull request #223 from Xceptance/dependency-update-snakeyaml
Dependency update snakeyaml
2 parents dc18726 + 09230de commit f4801d8

9 files changed

Lines changed: 65 additions & 65 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Maven Central](https://img.shields.io/maven-central/v/com.xceptance/neodymium-library.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.xceptance%22%20AND%20a:%22neodymium-library%22) [![Join the chat at https://gitter.im/neodymium-library/community](https://badges.gitter.im/neodymium-library/community.svg)](https://gitter.im/neodymium-library/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
22

3-
# Neodymium v4.1.4
3+
# Neodymium v4.1.5
44
Neodymium tries to solve your typical and most pressing UI test automation problems by combining JUnit, WebDriver, BDD/Cucumber, and proper reporting. It gives you ready to use templates, assembles well-known open source projects, and enhances this all with additional functionality that is often missing.
55

66
Neodymium is basically the combination of state of the art open source test libraries with additional glue to make it stick reliably together.
@@ -47,7 +47,7 @@ If you are still impatient, here is the quickest way to get Neodymium added to y
4747
<dependency>
4848
<groupId>com.xceptance</groupId>
4949
<artifactId>neodymium-library</artifactId>
50-
<version>4.1.4</version>
50+
<version>4.1.5</version>
5151
</dependency>
5252
```
5353
Add the `@RunWith` annotation to your test class or its superclass. This enables test execution with Neodymium.

config/browser.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ browserprofile.Chrome_headless.browser = chrome
118118
browserprofile.Chrome_headless.browserResolution = 1024x768
119119
browserprofile.Chrome_headless.arguments = -ignore-certificate-errors
120120
browserprofile.Chrome_headless.headless = true
121+
browserprofile.Chrome_headless.acceptInsecureCertificates = true
121122

122123
# Local headless Chrome
123124
browserprofile.Chrome_1500x1000_headless.name = Headless Google Chrome 1500x1000

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.xceptance</groupId>
66
<artifactId>neodymium-library</artifactId>
7-
<version>4.1.4</version>
7+
<version>4.1.5</version>
88

99
<name>neodymium-library</name>
1010
<url>https://github.com/Xceptance/neodymium-library</url>
@@ -223,7 +223,7 @@
223223
<dependency>
224224
<groupId>org.yaml</groupId>
225225
<artifactId>snakeyaml</artifactId>
226-
<version>1.31</version>
226+
<version>1.33</version>
227227
</dependency>
228228
<dependency>
229229
<groupId>io.cucumber</groupId>

src/test/java/com/xceptance/neodymium/testclasses/proxy/RunWithProxy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public void testProxyConfiguration()
2525
});
2626
}
2727

28-
// the test is expected to run since we configured a bypass for "www.xceptance.com"
28+
// the test is expected to run since we configured a bypass for "posters.xceptance.io"
2929
@Test
3030
public void testProxyBypassConfiguration()
3131
{
32-
Selenide.open("https://www.xceptance.com");
33-
$("#page #navigation").shouldBe(visible);
32+
Selenide.open("https://posters.xceptance.io:8443/posters/");
33+
$("#header-search-trigger").shouldBe(visible);
3434
}
3535
}

src/test/java/com/xceptance/neodymium/testclasses/softassertion/UseSoftAssertions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public class UseSoftAssertions
2828
public void validateSoftAssertion()
2929
{
3030
Neodymium.softAssertions(true);
31-
Selenide.open("https://blog.xceptance.com/");
31+
Selenide.open("https://posters.xceptance.io:8443/posters/");
3232

3333
Assert.assertEquals(Configuration.assertionMode, AssertionMode.SOFT);
3434
$("#notFound1").should(exist);
3535
$("#notFound2").should(exist);
36-
$("#masthead .search-toggle").click();
36+
$("#header-search-trigger").click();
3737
$("#notFound3").should(exist);
3838
Assert.assertThrows(ElementNotFound.class, () -> {
3939
$("#notFound4").click();

src/test/java/com/xceptance/neodymium/tests/ProxyConfigurationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ProxyConfigurationTest extends NeodymiumTest
2121

2222
private static final String PORT = "1323";
2323

24-
private static final String BYPASS = "www.xceptance.com";
24+
private static final String BYPASS = "posters.xceptance.io";
2525

2626
private static final String SOCKET_USERNAME = "username";
2727

src/test/java/com/xceptance/neodymium/util/DebugUtilsTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ public void testHighlighting()
2727
{
2828
Neodymium.configuration().setProperty("neodymium.debugUtils.highlight.duration", "500");
2929

30-
Selenide.open("https://blog.xceptance.com/");
30+
Selenide.open("https://posters.xceptance.io:8443/posters/");
3131
DebugUtils.injectJavaScript();
3232
assertJsSuccessfullyInjected();
3333

34-
final List<WebElement> list = $("body").findElements(By.cssSelector("#masthead"));
34+
final List<WebElement> list = $("body").findElements(By.cssSelector("#globalNavigation"));
3535
DebugUtils.highlightElements(list, Neodymium.getDriver());
3636
$(".neodymium-highlight-box").shouldBe(visible);
3737

3838
DebugUtils.resetAllHighlight();
3939
$(".neodymium-highlight-box").shouldNot(exist);
4040

41-
final List<WebElement> list2 = $("body").findElements(By.cssSelector("#content article"));
41+
final List<WebElement> list2 = $("body").findElements(By.cssSelector("#productList li"));
4242
DebugUtils.highlightElements(list2, Neodymium.getDriver());
43-
$$(".neodymium-highlight-box").shouldHaveSize(10);
43+
$$(".neodymium-highlight-box").shouldHaveSize(3);
4444

4545
DebugUtils.resetAllHighlight();
4646
$(".neodymium-highlight-box").shouldNot(exist);
@@ -51,11 +51,11 @@ public void testHighlightingWithoutImplicitWaitTime()
5151
{
5252
Neodymium.configuration().setProperty("neodymium.debugUtils.highlight.duration", "500");
5353

54-
Selenide.open("https://blog.xceptance.com/");
54+
Selenide.open("https://posters.xceptance.io:8443/posters/");
5555
DebugUtils.injectJavaScript();
5656
assertJsSuccessfullyInjected();
5757

58-
final List<WebElement> list = $("body").findElements(By.cssSelector("#masthead"));
58+
final List<WebElement> list = $("body").findElements(By.cssSelector("#globalNavigation"));
5959
DebugUtils.highlightElements(list, Neodymium.getDriver());
6060
$(".neodymium-highlight-box").shouldBe(visible);
6161

@@ -72,32 +72,32 @@ public void testWaiting()
7272
Neodymium.configuration().setProperty("neodymium.debugUtils.highlight", "true");
7373

7474
// one wait due to navigation
75-
Selenide.open("https://blog.xceptance.com/");
75+
Selenide.open("https://posters.xceptance.io:8443/posters/");
7676
Assert.assertEquals(0, eventListener.implicitWaitCount);
7777

7878
// one wait due to find
79-
$("body #masthead").should(exist);
79+
$("body #globalNavigation").should(exist);
8080
Assert.assertEquals(1, eventListener.implicitWaitCount);
8181
assertJsSuccessfullyInjected();
8282

8383
// two waits due to chain finding
84-
$("body").findElements(By.cssSelector("#content article"));
84+
$("body").findElements(By.cssSelector("#productList li"));
8585
Assert.assertEquals(3, eventListener.implicitWaitCount);
8686

8787
// two waits due to find and click
88-
$("#text-3 h1").click();
88+
$("#titleIndex").click();
8989
Assert.assertEquals(4, eventListener.implicitWaitCount);
9090

9191
// additional two waits due to find and click
92-
$("#masthead .search-toggle").click();
92+
$("#header-search-trigger").click();
9393
Assert.assertEquals(5, eventListener.implicitWaitCount);
9494

9595
// three waits due to find and change value (consumes 2 waits)
96-
$("#search-container .search-form input.search-field").val("abc");
96+
$("#searchForm input").val("abc");
9797
Assert.assertEquals(6, eventListener.implicitWaitCount);
9898

9999
// two waits due to find and press enter
100-
$("#search-container .search-form input.search-field").pressEnter();
100+
$("#searchForm input").pressEnter();
101101
Assert.assertEquals(7, eventListener.implicitWaitCount);
102102
}
103103

src/test/java/com/xceptance/neodymium/util/JavaScriptUtilsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class JavaScriptUtilsTest
1717
public void testWaitingAnimationSelectorUnconfigured()
1818
{
1919
Neodymium.configuration().setProperty("neodymium.javaScriptUtils.timeout", "10000");
20-
Selenide.open("https://blog.xceptance.com/");
20+
Selenide.open("https://posters.xceptance.io:8443/posters/");
2121
final long start = System.currentTimeMillis();
2222
JavaScriptUtils.waitForReady();
2323
final long end = System.currentTimeMillis();
@@ -28,10 +28,10 @@ public void testWaitingAnimationSelectorUnconfigured()
2828
@Test
2929
public void testWaitingAnimationSelectorExistsOnPage()
3030
{
31-
Neodymium.configuration().setProperty("neodymium.javaScriptUtils.loading.animationSelector", "#main-content");
31+
Neodymium.configuration().setProperty("neodymium.javaScriptUtils.loading.animationSelector", "#main");
3232
Neodymium.configuration().setProperty("neodymium.javaScriptUtils.timeout", "10000");
3333

34-
Selenide.open("https://blog.xceptance.com/");
34+
Selenide.open("https://posters.xceptance.io:8443/posters/");
3535
final long start = System.currentTimeMillis();
3636
JavaScriptUtils.waitForReady();
3737
final long end = System.currentTimeMillis();
@@ -46,7 +46,7 @@ public void testWaitingAnimationSelectorUnavailableOnPage()
4646
Neodymium.configuration().setProperty("neodymium.javaScriptUtils.loading.animationSelector", ".cantFindThisClass");
4747
Neodymium.configuration().setProperty("neodymium.javaScriptUtils.timeout", "10000");
4848

49-
Selenide.open("https://blog.xceptance.com/");
49+
Selenide.open("https://posters.xceptance.io:8443/posters/");
5050
final long start = System.currentTimeMillis();
5151
JavaScriptUtils.waitForReady();
5252
final long end = System.currentTimeMillis();

src/test/java/com/xceptance/neodymium/util/SelenideAddonsTest.java

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,99 +36,99 @@
3636
@Browser("Chrome_headless")
3737
public class SelenideAddonsTest
3838
{
39-
private void openBlogPage()
39+
private void openPostersStartPage()
4040
{
41-
Selenide.open("https://blog.xceptance.com/");
41+
Selenide.open("https://posters.xceptance.io:8443/posters/");
4242
}
4343

4444
@Test
4545
public void testMatchesAttributeCondition()
4646
{
47-
openBlogPage();
48-
$("#masthead .search-toggle").click();
47+
openPostersStartPage();
48+
$("#header-search-trigger").click();
4949

50-
$("#search-container .search-field").should(SelenideAddons.matchesAttribute("placeholder", "Search"));
50+
$("#searchForm input").should(SelenideAddons.matchesAttribute("placeholder", "Search"));
5151
}
5252

5353
@Test
5454
public void testMatchAttributeCondition()
5555
{
56-
openBlogPage();
57-
$("#masthead .search-toggle").click();
56+
openPostersStartPage();
57+
$("#header-search-trigger").click();
5858

59-
$("#search-container .search-field").should(SelenideAddons.matchAttribute("placeholder", "^S.a.c.\\s…"));
60-
$("#search-container .search-field").should(SelenideAddons.matchAttribute("placeholder", "\\D+"));
59+
$("#searchForm input").should(SelenideAddons.matchAttribute("placeholder", "^S.a.c."));
60+
$("#searchForm input").should(SelenideAddons.matchAttribute("placeholder", "\\D+"));
6161
}
6262

6363
@Test
6464
public void testMatchAttributeConditionError()
6565
{
66-
openBlogPage();
67-
$("#masthead .search-toggle").click();
66+
openPostersStartPage();
67+
$("#header-search-trigger").click();
6868

6969
Assert.assertThrows(ElementShould.class, () -> {
70-
$("#search-container .search-field").should(SelenideAddons.matchAttribute("placeholder", "\\d+"));
70+
$("#searchForm input").should(SelenideAddons.matchAttribute("placeholder", "\\d+"));
7171
});
7272
}
7373

7474
@Test
7575
public void testMatchAttributeConditionErrorMissingAttribute()
7676
{
77-
openBlogPage();
78-
$("#masthead .search-toggle").click();
77+
openPostersStartPage();
78+
$("#header-search-trigger").click();
7979

8080
Assert.assertThrows(ElementShould.class, () -> {
81-
$("#search-container .search-field").should(SelenideAddons.matchAttribute("foo", "bar"));
81+
$("#searchForm input").should(SelenideAddons.matchAttribute("foo", "bar"));
8282
});
8383
}
8484

8585
@Test
8686
public void testMatchesValueCondition()
8787
{
88-
openBlogPage();
89-
$("#masthead .search-toggle").click();
90-
$("#search-container .search-field").val("searchphrase").submit();
88+
openPostersStartPage();
89+
$("#header-search-trigger").click();
90+
$("#searchForm input").val("mozzarella").submit();
9191

92-
$("#content .search-field").should(SelenideAddons.matchesValue("earchphras"));
92+
$("#searchForm input").should(SelenideAddons.matchesValue("ozzarell"));
9393
}
9494

9595
@Test
9696
public void testMatchValueCondition()
9797
{
98-
openBlogPage();
99-
$("#masthead .search-toggle").click();
100-
$("#search-container .search-field").val("searchphrase").submit();
98+
openPostersStartPage();
99+
$("#header-search-trigger").click();
100+
$("#searchForm input").val("mozzarella").submit();
101101

102-
$("#content .search-field").should(SelenideAddons.matchValue("^s.a.c.p.r.s.$"));
103-
$("#content .search-field").should(SelenideAddons.matchValue("\\D+"));
102+
$("#searchForm input").should(SelenideAddons.matchValue("^m.z.a.e.l.$"));
103+
$("#searchForm input").should(SelenideAddons.matchValue("\\D+"));
104104
}
105105

106106
@Test
107107
public void testMatchValueConditionError()
108108
{
109-
openBlogPage();
110-
$("#masthead .search-toggle").click();
111-
$("#search-container .search-field").val("searchphrase").submit();
109+
openPostersStartPage();
110+
$("#header-search-trigger").click();
111+
$("#searchForm input").val("mozzarella").submit();
112112

113113
Assert.assertThrows(ElementShould.class, () -> {
114-
$("#content .search-field").should(SelenideAddons.matchValue("\\d+"));
114+
$("#searchForm input").should(SelenideAddons.matchValue("\\d+"));
115115
});
116116
}
117117

118118
@Test()
119119
public void testWrapAssertion()
120120
{
121-
openBlogPage();
121+
openPostersStartPage();
122122

123123
SelenideAddons.wrapAssertionError(() -> {
124-
Assert.assertEquals("Passionate Testing | Xceptance Blog", Selenide.title());
124+
Assert.assertEquals("Posters - The Ultimate Online Shop", Selenide.title());
125125
});
126126
}
127127

128128
@Test
129129
public void testWrapAssertionError()
130130
{
131-
openBlogPage();
131+
openPostersStartPage();
132132

133133
Assert.assertThrows(UIAssertionError.class, () -> {
134134
SelenideAddons.wrapAssertionError(() -> {
@@ -161,11 +161,10 @@ public void beforeEvent(LogEvent currentLog)
161161
}
162162
});
163163

164-
openBlogPage();
164+
openPostersStartPage();
165165
Neodymium.softAssertions(true);
166166
try
167167
{
168-
169168
SelenideAddons.wrapAssertionError(() -> {
170169
Assert.assertEquals(errMessage, "MyPageTitle", Selenide.title());
171170
});
@@ -202,7 +201,7 @@ public void beforeEvent(LogEvent currentLog)
202201
}
203202
});
204203

205-
openBlogPage();
204+
openPostersStartPage();
206205
Neodymium.softAssertions(true);
207206
try
208207
{
@@ -223,7 +222,7 @@ public void testWrapAssertionErrorWithoutMessage()
223222
final String errMessage = "AssertionError: No error message provided by the Assertion.";
224223
try
225224
{
226-
openBlogPage();
225+
openPostersStartPage();
227226
SelenideAddons.wrapAssertionError(() -> {
228227
Assert.assertTrue(Selenide.title().startsWith("MyPageTitle"));
229228
});
@@ -323,7 +322,7 @@ public void testSafeSupplier()
323322
final Iterator<Runnable> iterator = runArray.iterator();
324323

325324
// testing the error path after three exceptions
326-
openBlogPage();
325+
openPostersStartPage();
327326
long startTime = new Date().getTime();
328327
try
329328
{
@@ -501,7 +500,7 @@ public void testRightwardDragAndDrop()
501500

502501
SelenideElement slider = $(".balSlider span[role=slider]");
503502
slider.shouldHave(attribute("aria-valuenow", "0"));
504-
SelenideAddons.dragAndDrop(slider, 32, 0);
503+
SelenideAddons.dragAndDrop(slider, 42, 0);
505504
slider.shouldHave(attribute("aria-valuenow", "2"));
506505
}
507506

@@ -512,7 +511,7 @@ public void testLeftwardDragAndDrop()
512511

513512
SelenideElement slider = $(".balSlider span[role=slider]");
514513
slider.shouldHave(attribute("aria-valuenow", "0"));
515-
SelenideAddons.dragAndDrop(slider, -32, 0);
514+
SelenideAddons.dragAndDrop(slider, -42, 0);
516515
slider.shouldHave(attribute("aria-valuenow", "-2"));
517516
}
518517

0 commit comments

Comments
 (0)