Skip to content

Commit ee1a229

Browse files
committed
test: fix flaky Series.Add-Comment.Logic.Add a comment
Fix #1465
1 parent 0ad4b56 commit ee1a229

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/main/frontend/src/components/AddCommentForm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ class AddCommentFormView extends React.PureComponent {
100100
{ l10n['t_server_error'] || 'Server error' }
101101
</div>
102102
<div className="form-group form-group-sm">
103-
<label htmlFor="comment" className="control-label col-sm-3">
103+
<label htmlFor="new-comment" className="control-label col-sm-3">
104104
{ l10n['t_comment'] || 'Comment' }
105105
</label>
106106
<div className="col-sm-6">
107107
<textarea
108-
id="comment"
108+
id="new-comment"
109109
className="form-control"
110110
cols="22"
111111
rows="3"
@@ -116,7 +116,7 @@ class AddCommentFormView extends React.PureComponent {
116116
</div>
117117
<div className="col-sm-offset-3 col-sm-4">
118118
<span
119-
id="comment.errors"
119+
id="new-comment.errors"
120120
className={ `help-block ${hasValidationErrors ? '' : 'hidden'}` }>
121121
{ validationErrors.join(', ') }
122122
</span>

src/test/robotframework/selenium.utils.robot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Link Should Point To
3333
${url}= Get Element Attribute ${locator}@href
3434
Should Be Equal ${expectedUrl} ${url}
3535

36+
# NOTE: this keyword should be used as a last resort. Prefer "Wait Until Page Contains Element"
37+
# with some other keyword for checking element's state where possible
3638
Wait Until Element Value Is
3739
[Documentation] Hybrid of "Wait Until Page Contains Element" and "Textfield Value Should Be" keywords
3840
[Arguments] ${id} ${text}

src/test/robotframework/series/add-comment/logic.robot

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ Force Tags series add-comment logic
99

1010
*** Test Cases ***
1111
Add a comment
12-
Input Text id:comment A comment
12+
Input Text id:new-comment A comment
1313
Submit Form id:add-comment-form
1414
Wait Until Page Does Not Contain id:add-comment-form
15-
Wait Until Element Value Is comment A comment
15+
Wait Until Page Contains Element id:comment
16+
Element Text Should Be id:comment A comment
1617

1718
*** Keywords ***
1819
Before Test Suite

0 commit comments

Comments
 (0)