Skip to content

Commit 0d6f38c

Browse files
committed
test: when we add a series sale, an alternative price must always be specified together with currency
Fix #1011
1 parent 2b1e9db commit 0d6f38c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/main/java/ru/mystamps/web/feature/series/sale/AddSeriesSalesForm.java

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import java.math.BigDecimal;
3333
import java.util.Date;
3434

35-
// @todo #678 Add integration tests for price and alternative price: both or none are required
3635
@Getter
3736
@Setter
3837
@FieldsMismatch(first = "sellerId", second = "buyerId", message = "{seller.buyer.match}")

src/test/robotframework/series/sales/validation.robot

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ Create series sale with the prices in the same currency
2828
Submit Form id:add-series-sales-form
2929
Element Text Should Be id:alt-currency.errors Price and alternative price must be in a different currencies
3030

31+
Create series sale with alternative price but without currency
32+
Input Text id:alt-price 200
33+
Select From List By Value id:alt-currency ${EMPTY}
34+
Submit Form id:add-series-sales-form
35+
Element Text Should Be id:alt-currency.errors Alternative price and currency must be specified or left empty, specifying only one of them makes no-sense
36+
37+
Create series sale with alternative currency but without price
38+
Input Text id:alt-price ${EMPTY}
39+
Select From List By Label id:alt-currency GBP
40+
Submit Form id:add-series-sales-form
41+
Element Text Should Be id:alt-currency.errors Alternative price and currency must be specified or left empty, specifying only one of them makes no-sense
42+
3143
Create series sale with the same seller and buyer
3244
Select From List By Label id:seller Tommy Lee Jones
3345
Select From List By Label id:buyer Tommy Lee Jones

0 commit comments

Comments
 (0)