Skip to content

Commit d3f6dc8

Browse files
committed
/test/valid/series-info/new-seller: port to using WireMock stub.
Also add <meta charset> tag to fix dislaying of the page in a browser. No functional changes.
1 parent ccc284d commit d3f6dc8

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

src/main/java/ru/mystamps/web/controller/TestController.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,4 @@ public void seriesInfoWithExistingSeller(HttpServletResponse response) throws IO
5151
);
5252
}
5353

54-
@GetMapping("/test/valid/series-info/new-seller")
55-
public void seriesInfoWithNewSeller(HttpServletResponse response) throws IOException {
56-
printHtml(
57-
response,
58-
"<!DOCTYPE html>"
59-
+ "<html>"
60-
+ "<head>"
61-
+ "<title>Series info (new seller)</title>"
62-
+ "</head>"
63-
+ "<body>"
64-
// CheckStyle: ignore LineLength for next 2 lines
65-
+ "Image: <a id=\"series-image-link-1\" href=\"/image/1\">series image</a><br />"
66-
+ "Seller: <a id=\"test-seller\" href=\"http://example.com/lando-livianus\">Lando Livianus</a><br />"
67-
+ "Price: <span id=\"test-price\">320.5</span> RUB<br />"
68-
// this is needed to simplify an integration test
69-
// (required fields "category" and "quantity" will be filled automatically)
70-
+ "Info: <span class=\"dl-horizontal\">Спорт, 7 марок</span>"
71-
+ "</body>"
72-
+ "</html>"
73-
);
74-
}
75-
7654
}

src/test/robotframework/series/import/request-logic.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Import series and series sale with existing seller from an external site
112112

113113
Import series and series sale with a new seller from an external site
114114
[Documentation] Verify import series and sale (with a new seller)
115-
Input Text id=url http://localhost:8080/test/valid/series-info/new-seller
115+
Input Text id=url ${MOCK_SERVER}/series/import/request-logic/new-seller.html
116116
Submit Form id=import-series-form
117117
${requestLocation}= Get Location
118118
Should Match Regexp ${requestLocation} /series/import/request/\\d+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Series info (new seller)</title>
6+
</head>
7+
<body>
8+
Image: <a id="series-image-link-1" href="http://127.0.0.1:8080/image/1">series image</a><br />
9+
Seller: <a id="test-seller" href="http://example.com/lando-livianus">Lando Livianus</a><br />
10+
Price: <span id="test-price">320.5</span> RUB<br />
11+
<!--
12+
This is needed to simplify an integration test:
13+
required fields "category" and "quantity" will be filled automatically
14+
-->
15+
Info: <span class="dl-horizontal">Спорт, 7 марок</span>
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)