Skip to content

Commit b338250

Browse files
committed
test(series/sales/validation.robot): add integration test to ensure that seller and buyer are different.
Fix #1008
1 parent 8a5542e commit b338250

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.math.BigDecimal;
3434
import java.util.Date;
3535

36-
// @todo #503 Add integration test to ensure that seller and buyer are different
3736
// @todo #504 Add integration test to ensure that price and alternative price are different
3837
// @todo #678 Add integration tests for price and alternative price: both or none are required
3938
@Getter

src/main/resources/liquibase/version/0.4.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@
5757
<include file="0.4/2018-10-16--similar_series.xml" relativeToChangelogFile="true"/>
5858
<include file="0.4/2018-12-03--site_parsers.xml" relativeToChangelogFile="true"/>
5959
<include file="0.4/2018-12-20--nullify_currency_without_price.xml" relativeToChangelogFile="true"/>
60+
<include file="0.4/2019-05-25--test_participant_buyer_and_seller.xml" relativeToChangelogFile="true"/>
6061

6162
</databaseChangeLog>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
6+
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
7+
8+
<changeSet id="create-participant-that-is-buyer-and-seller" author="php-coder" context="test-data">
9+
<comment>Creates buyers and sellers examples</comment>
10+
11+
<insert tableName="transaction_participants">
12+
<column name="id" value="4" />
13+
<column name="name" value="Tommy Lee Jones" />
14+
<column name="url" value="http://example.com/tommy-lee-jones" />
15+
<column name="is_buyer" valueBoolean="true" />
16+
<column name="is_seller" valueBoolean="true" />
17+
</insert>
18+
19+
</changeSet>
20+
21+
</databaseChangeLog>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ Create series sales with invalid url
1818
Submit Form id=add-series-sales-form
1919
Element Text Should Be id=url.errors Value must be a valid URL
2020

21+
Create series sale with the same seller and buyer
22+
Select From List By Label id=seller Tommy Lee Jones
23+
Select From List By Label id=buyer Tommy Lee Jones
24+
Submit Form id=add-series-sales-form
25+
Element Text Should Be id=buyer.errors Seller and buyer must be different
26+
2127
*** Keywords ***
2228
Before Test Suite
2329
Open Browser ${SITE_URL}/account/auth ${BROWSER}

0 commit comments

Comments
 (0)