Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Define Provider CRUD Flash message strings in Provider Class #4250

Open
mshriver opened this issue Feb 21, 2017 · 2 comments
Open

Define Provider CRUD Flash message strings in Provider Class #4250

mshriver opened this issue Feb 21, 2017 · 2 comments
Assignees

Comments

@mshriver
Copy link
Member

mshriver commented Feb 21, 2017

Originally raised by Pete in PR #4241 for the test_providers module.

Instead of generating and hard-coding the expected flash messages for a provider CRUD action (positive or negative) in tests, define the expected flash messages in the provider class as constants and refer to them in the tests or class CRUD actions.

@mfalesni
Copy link
Contributor

We could possibly even use Widgetastic's ParametrizedString for it.
save_flash_message = ParametrizedString('Provider "{@name}" was saved')

@mshriver mshriver self-assigned this Aug 15, 2017
mshriver added a commit to mshriver/integration_tests that referenced this issue Aug 25, 2017
For consistent flash message assertions across framework

FIXES ManageIQ#4250
FIXES RHCFQE-3859
@mshriver
Copy link
Member Author

@mfalesni didn't use ParametrizedString in commit ca5ffoc, will try it out though.

Would solve problem of having strings that require a .format() call with some number of params.

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

No branches or pull requests

2 participants