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

MessageContext does not warn about improper use of message tables #515

Closed
pfrenssen opened this issue Oct 15, 2018 · 0 comments
Closed

MessageContext does not warn about improper use of message tables #515

pfrenssen opened this issue Oct 15, 2018 · 0 comments

Comments

@pfrenssen
Copy link
Collaborator

Whenever a list of messages is checked in MessageContext, the step definitions expect to be passed a table of messages with a header indicating the message type, such as error messages:

Then I should see the following warning messages:
  | warning messages                                                                     |
  | You are viewing the published version. To view the latest draft version, click here. |

When this header is not present the messages will not be checked. Currently no warning is being emitted when this happens, so when a developer uses the following table the test will be silently skipped:

Then I should see the following warning messages:
  | You are viewing the published version. To view the latest draft version, click here. |

It is likely that developers miss this sometimes in their tests since it is not documented that the header is required, and is only apparent when reading the code. We recently discovered this and did a check in our existing test suite and found that in numerous occasions the header was missed: ec-europa/joinup-dev#1388

It would be nice if we could improve the documentation to clearly indicate that this header is required, and also fail the test if the header is missing.

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

No branches or pull requests

1 participant