File tree Expand file tree Collapse file tree 8 files changed +155
-3
lines changed
webapp/WEB-INF/views/series/import
test/robotframework/series/import Expand file tree Collapse file tree 8 files changed +155
-3
lines changed Original file line number Diff line number Diff line change 13
13
<include file =" version/0.4.xml" relativeToChangelogFile =" true" />
14
14
<include file =" version/0.4.1.xml" relativeToChangelogFile =" true" />
15
15
<include file =" version/0.4.2.xml" relativeToChangelogFile =" true" />
16
+
17
+ <include file =" test-data.xml" relativeToChangelogFile =" true" />
16
18
17
19
</databaseChangeLog >
Original file line number Diff line number Diff line change
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.1.xsd" >
7
+
8
+ <include file =" test-data/transaction_participants.xml" relativeToChangelogFile =" true" />
9
+
10
+ <!-- Depends on: series_import_request_statuses, users -->
11
+ <include file =" test-data/series_import_requests.xml" relativeToChangelogFile =" true" />
12
+
13
+ <!-- Depends on: series_import_requests, transaction_participants -->
14
+ <include file =" test-data/series_import_parsed_data.xml" relativeToChangelogFile =" true" />
15
+
16
+ <!-- Depends on: series_import_requests -->
17
+ <include file =" test-data/series_sales_import_parsed_data.xml" relativeToChangelogFile =" true" />
18
+
19
+ </databaseChangeLog >
Original file line number Diff line number Diff line change
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.1.xsd" >
7
+
8
+ <changeSet id =" add-series-parsed-data-for-gh1232" author =" php-coder" context =" test-data" >
9
+
10
+ <insert tableName =" series_import_parsed_data" >
11
+ <column name =" request_id" valueComputed =" (SELECT id FROM series_import_requests WHERE url = 'http://example.com/issue/1232')" />
12
+ <column name =" created_at" valueComputed =" ${NOW}" />
13
+ <column name =" updated_at" valueComputed =" ${NOW}" />
14
+ </insert >
15
+
16
+ <insert tableName =" series_import_parsed_data" >
17
+ <column name =" request_id" valueComputed =" (SELECT id FROM series_import_requests WHERE url = 'http://example.com/issue/1232/with-seller-id')" />
18
+ <column name =" created_at" valueComputed =" ${NOW}" />
19
+ <column name =" updated_at" valueComputed =" ${NOW}" />
20
+ </insert >
21
+
22
+ </changeSet >
23
+
24
+ </databaseChangeLog >
Original file line number Diff line number Diff line change
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.1.xsd" >
7
+
8
+ <changeSet id =" add-import-request-for-gh1232" author =" php-coder" context =" test-data" >
9
+
10
+ <insert tableName =" series_import_requests" >
11
+ <column name =" url" value =" http://example.com/issue/1232" />
12
+ <column name =" status_id" valueComputed =" (SELECT id FROM series_import_request_statuses WHERE name = 'ParsingSucceeded')" />
13
+ <column name =" requested_at" valueComputed =" ${NOW}" />
14
+ <column name =" requested_by" valueComputed =" (SELECT id FROM users WHERE role = 'ADMIN' ORDER by id LIMIT 1)" />
15
+ <column name =" updated_at" valueComputed =" ${NOW}" />
16
+ </insert >
17
+
18
+ <insert tableName =" series_import_requests" >
19
+ <column name =" url" value =" http://example.com/issue/1232/with-seller-id" />
20
+ <column name =" status_id" valueComputed =" (SELECT id FROM series_import_request_statuses WHERE name = 'ParsingSucceeded')" />
21
+ <column name =" requested_at" valueComputed =" ${NOW}" />
22
+ <column name =" requested_by" valueComputed =" (SELECT id FROM users WHERE role = 'ADMIN' ORDER by id LIMIT 1)" />
23
+ <column name =" updated_at" valueComputed =" ${NOW}" />
24
+ </insert >
25
+
26
+ </changeSet >
27
+
28
+ </databaseChangeLog >
Original file line number Diff line number Diff line change
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.1.xsd" >
7
+
8
+ <changeSet id =" add-series-sale-without-seller-info-but-with-price" author =" php-coder" context =" test-data" >
9
+
10
+ <insert tableName =" series_sales_import_parsed_data" >
11
+ <column name =" request_id" valueComputed =" (SELECT id FROM series_import_requests WHERE url = 'http://example.com/issue/1232')" />
12
+ <column name =" price" valueNumeric =" 100" />
13
+ <column name =" currency" value =" RUB" />
14
+ <column name =" created_at" valueComputed =" ${NOW}" />
15
+ <column name =" updated_at" valueComputed =" ${NOW}" />
16
+ </insert >
17
+
18
+ <insert tableName =" series_sales_import_parsed_data" >
19
+ <column name =" request_id" valueComputed =" (SELECT id FROM series_import_requests WHERE url = 'http://example.com/issue/1232/with-seller-id')" />
20
+ <column name =" seller_id" valueNumeric =" (SELECT id FROM transaction_participants WHERE url = 'http://example.com/issue/1232/with-seller-id')" />
21
+ <column name =" price" valueNumeric =" 100" />
22
+ <column name =" currency" value =" RUB" />
23
+ <column name =" created_at" valueComputed =" ${NOW}" />
24
+ <column name =" updated_at" valueComputed =" ${NOW}" />
25
+ </insert >
26
+
27
+ </changeSet >
28
+
29
+ </databaseChangeLog >
Original file line number Diff line number Diff line change
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.1.xsd" >
7
+
8
+ <changeSet id =" add-participant-for-gh1232" author =" php-coder" context =" test-data" >
9
+
10
+ <insert tableName =" transaction_participants" >
11
+ <column name =" name" value =" gh1232" />
12
+ <column name =" url" value =" http://example.com/issue/1232/with-seller-id" />
13
+ <column name =" is_buyer" valueBoolean =" false" />
14
+ <column name =" is_seller" valueBoolean =" true" />
15
+ </insert >
16
+
17
+ </changeSet >
18
+
19
+ </databaseChangeLog >
Original file line number Diff line number Diff line change @@ -360,7 +360,8 @@ <h3 th:text="#{t_gathered_data}">
360
360
</tr>
361
361
/*/-->
362
362
363
- < tr th:if ="${hasSellerInfo and importSeriesForm.seller.groupId != null} " th:classappend ="${#fields.hasErrors('seller.groupId') ? 'has-error' : ''} ">
363
+ < tr th:if ="${(hasSellerInfo and importSeriesForm.seller.groupId != null) or (hasSalesInfo and importSeriesForm.seriesSale.sellerId == null)} "
364
+ th:classappend ="${#fields.hasErrors('seller.groupId') ? 'has-error' : ''} ">
364
365
< th >
365
366
< label for ="seller-group " class ="control-label " th:text ="#{t_seller_group} ">
366
367
Seller group
@@ -390,7 +391,8 @@ <h3 th:text="#{t_gathered_data}">
390
391
</ td >
391
392
</ tr >
392
393
393
- < tr th:if ="${hasSellerInfo and importSeriesForm.seller.name != null} " th:classappend ="${#fields.hasErrors('seller.name') ? 'has-error' : ''} ">
394
+ < tr th:if ="${(hasSellerInfo and importSeriesForm.seller.name != null) or (hasSalesInfo and importSeriesForm.seriesSale.sellerId == null)} "
395
+ th:classappend ="${#fields.hasErrors('seller.name') ? 'has-error' : ''} ">
394
396
< th >
395
397
< label for ="seller-name " class ="control-label " th:text ="#{t_seller_name} ">
396
398
Seller name
@@ -413,7 +415,8 @@ <h3 th:text="#{t_gathered_data}">
413
415
</ td >
414
416
</ tr >
415
417
416
- < tr th:if ="${hasSellerInfo and importSeriesForm.seller.url != null} " th:classappend ="${#fields.hasErrors('seller.url') ? 'has-error' : ''} ">
418
+ < tr th:if ="${(hasSellerInfo and importSeriesForm.seller.url != null) or (hasSalesInfo and importSeriesForm.seriesSale.sellerId == null)} "
419
+ th:classappend ="${#fields.hasErrors('seller.url') ? 'has-error' : ''} ">
417
420
< th >
418
421
< label for ="seller-url " class ="control-label " th:text ="#{t_seller_url} ">
419
422
Seller URL
Original file line number Diff line number Diff line change
1
+ *** Settings ***
2
+ Documentation Miscellaneous aspects of a series import
3
+ Library SeleniumLibrary
4
+ Resource ../../auth.steps.robot
5
+ Suite Setup Before Test Suite
6
+ Suite Teardown Close Browser
7
+ Force Tags series import-series misc
8
+
9
+ *** Test Cases ***
10
+ Seller info should be visible where only price and currency have been extracted
11
+ Go To ${SITE_URL } /series/import/request/3
12
+ Element Text Should Be id:request-url http://example.com/issue/1232
13
+ Element Should Be Visible id:seller-group
14
+ Element Should Be Visible id:seller-name
15
+ Element Should Be Visible id:seller-url
16
+
17
+ Seller info should be invisible where seller id has been extracted
18
+ Go To ${SITE_URL } /series/import/request/4
19
+ List Selection Should Be id:seller gh1232
20
+ Element Should Not Be Visible id:seller-group
21
+ Element Should Not Be Visible id:seller-name
22
+ Element Should Not Be Visible id:seller-url
23
+
24
+ *** Keywords ***
25
+ Before Test Suite
26
+ Open Browser ${SITE_URL } /account/auth ${BROWSER }
27
+ Register Keyword To Run On Failure Log Source
28
+ Log In As login=admin password=test
You can’t perform that action at this time.
0 commit comments