Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update series: add validation for a comment #1411

Closed
0pdd opened this issue May 24, 2020 · 2 comments
Closed

Update series: add validation for a comment #1411

0pdd opened this issue May 24, 2020 · 2 comments
Assignees
Milestone

Comments

@0pdd
Copy link

0pdd commented May 24, 2020

The puzzle 785-b7c2e7d1 from #785 has to be resolved:

// @todo #785 Update series: add validation for a comment

The puzzle was created by Slava Semushin on 24-May-20.

@php-coder
Copy link
Owner

Валидация на длину строки:

@Size(max = MAX_SERIES_COMMENT_LENGTH, message = "{value.too-long}")
private String comment;

Create series with too long comment
${letter}= Set Variable x
Click Element id:add-comment-link
Wait Until Element Is Visible id:comment
Input Text id:comment ${letter * 1025}
Submit Form id:add-series-form
Element Text Should Be id:comment.errors Value is greater than allowable maximum of 1024 characters

  • надо реализовать удаление "висячих" пробелов:

Comment should be stripped from leading and trailing spaces
Disable Client Validation add-series-form
Click Element id:add-comment-link
Input Text id:comment ${SPACE * 2}example comment${SPACE * 2}
Submit Form id:add-series-form
Textarea Value Should Be id:comment example comment

@php-coder php-coder self-assigned this Jan 31, 2021
@php-coder php-coder added this to the 0.4.6 milestone Jan 31, 2021
php-coder added a commit that referenced this issue Jan 31, 2021
…is no errors

This also should simplify our integration tests because now they can wait only for element presence.
Previously they also had to wait for an error message.

Relate to #1411
@php-coder
Copy link
Owner

надо реализовать удаление "висячих" пробелов

Оно уже есть. См. PatchRequest.setValue()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants