integration_tests icon indicating copy to clipboard operation
integration_tests copied to clipboard

All tests should have asserts checking currently expected state (including expected end state)

Open jkrocil opened this issue 8 years ago • 3 comments

E.g. https://github.com/RedHatQE/cfme_tests/blob/91eee0703f41173578aba93231f4cfdc5a5d3b96/cfme/tests/configure/test_tag.py#L32

Looking at this test, the delete action is not checked. We don't know if the object got deleted or not. Even if there was a flash message check inside Tag.delete to confirm that the object got deleted (and there is not one btw, unlike Category.delete, because there is no flash message for this action in the UI for some reason) we shouldn't trust that flash message.

We need asserts checking current expected states in cases like this.

jkrocil avatar May 25 '16 07:05 jkrocil

Doesn't even check flash messages https://github.com/RedHatQE/cfme_tests/blob/ab945813f22a27b2f3766141bad3f57d4c868e37/cfme/configure/configuration/init.py#L1808

mfalesni avatar May 26 '16 11:05 mfalesni

That's what my comment says @mfalesni. It doesn't because there is none.

jkrocil avatar May 26 '16 11:05 jkrocil

@jkrocil sorry, I was a bit blind :)

mfalesni avatar May 26 '16 14:05 mfalesni