-
Notifications
You must be signed in to change notification settings - Fork 1
Accession spawn Accession #17
Conversation
ef12429 to
20237f4
Compare
balmas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A couple of minor changes suggested.
| expect(page).to have_field(label, checked: true) | ||
| end | ||
|
|
||
| Then 'the following error message is displayed' do |messages| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe consider renaming to 'only the following error message is displayed' since that's what distinguishes this method from the prior one which also tests for a message being displayed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it is more distinguishable that way. I have prepended the word only to all the steps that refer to a single message, as well as a check that there is only one message wherever it was missing.
Some notes, which also apply to the other reviews (16)
@kdimopulu suggested the same thing before submitting for review, but I thought that since the distinction is already there (plural/singular), it's redundant to prepend the word only, to make it as simple and intuitive as possible for the Gherkin writer, without having to search other steps or referring to the documentation.
From the technical point of view, the error/info messages can always be an arbitrary amount of entries in Gherkin/Cucumber, so we could even use the plural version for everything, to make it even simpler.
eg.: Somebody could write the following for a single message, which is totally valid:
Given ...
When ...
Then the following error messages are displayed
| Expression - is required unless a begin or end date is given |
Then ...
| expect(find('.alert.alert-success.with-hide-alert').text).to match(/^#{string}.*updated$/i) | ||
| end | ||
|
|
||
| Then('the following info message is displayed') do |messages| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/b 'the following info messages are displayed' because it accepts and tests multiple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. There is a check for messages length now.
brianzelip
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
faf13d9 to
1c04ca1
Compare
a7ee499 to
70b6d9a
Compare
No description provided.