Skip to content

Commit d76a888

Browse files
committed
test: admin can add catalog numbers to a series.
Relate to #1339 Part of #1410
1 parent c8b1fd9 commit d76a888

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

src/main/frontend/src/components/AddCatalogNumbersForm.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ class AddCatalogNumbersFormView extends React.PureComponent {
105105

106106
return (
107107
<div className="col-sm-12 form-group">
108-
<form className={ `form-horizontal ${hasValidationErrors ? 'has-error' : ''}` }
108+
<form id="add-catalog-numbers-form"
109+
className={ `form-horizontal ${hasValidationErrors ? 'has-error' : ''}` }
109110
onSubmit={ handleSubmit }>
110111
<div
111112
id="add-catalog-numbers-failed-msg"

src/main/java/ru/mystamps/web/feature/series/RestSeriesController.java

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class RestSeriesController {
4848

4949
private final SeriesService seriesService;
5050

51-
// @todo #785 Update series: add integration test
5251
// @todo #785 Update series: add validation for a comment
5352
// @todo #1339 Update series: add validation for catalog numbers
5453
// @todo #1340 Update series: add validation for a price

src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class ResourceUrl {
3232
public static final String STATIC_RESOURCES_URL = "https://stamps.filezz.ru";
3333

3434
// MUST be updated when any of our resources were modified
35-
public static final String RESOURCES_VERSION = "v0.4.3.13";
35+
public static final String RESOURCES_VERSION = "v0.4.3.14";
3636

3737
// CheckStyle: ignore LineLength for next 15 lines
3838
private static final String CATALOG_UTILS_JS = "/public/js/" + RESOURCES_VERSION + "/CatalogUtils.min.js";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
*** Settings ***
2+
Documentation Verify scenarios of adding catalog numbers to a series
3+
Library SeleniumLibrary
4+
Resource ../../auth.steps.robot
5+
Suite Setup Before Test Suite
6+
Suite Teardown Close Browser
7+
Force Tags series add-numbers logic
8+
9+
*** Test Cases ***
10+
Add catalog numbers
11+
[Template] Add numbers
12+
michel 10-12,100 10-12, 100
13+
scott 20-22,200 20-22, 200
14+
yvert 30-32,300 30-32, 300
15+
gibbons 40-42,400 40-42, 400
16+
solovyov 50-52,500 50-52, 500
17+
zagorski 60-62,600 60-62, 600
18+
19+
*** Keywords ***
20+
Before Test Suite
21+
Open Browser ${SITE_URL}/account/auth ${BROWSER}
22+
Register Keyword To Run On Failure Log Source
23+
Log In As login=admin password=test
24+
Go To ${SITE_URL}/series/5
25+
26+
Add numbers
27+
[Arguments] ${catalog} ${numbers} ${expectedNumbers}
28+
Wait Until Page Contains Element id:add-catalog-numbers-form
29+
Select From List By Value id:numbers-catalog-name ${catalog}
30+
Input Text id:catalog-numbers ${numbers}
31+
Submit Form id:add-catalog-numbers-form
32+
Wait Until Page Contains Element id:${catalog}_catalog_info
33+
Element Text Should Be id:${catalog}_catalog_info \#${expectedNumbers}

0 commit comments

Comments
 (0)