QA::Scenario::Test::Sanity::Selectors not working for some nested page object modules
Summary
This issue was discovered in #213183 (comment 316026502)
QA::Scenario::Test::Sanity::Selectors
are not working on some views in page objects such as:
- QA::EE::Page::Project::SubMenus::SecurityCompliance
- QA::EE::Page::Project::SubMenus::Packages
- QA::EE::Page::Project::SubMenus::Settings
- QA::EE::Page::Project::SubMenus::Repository
- QA::EE::Page::Group::Settings::General
This is because the views for sanity checks are NOT getting added to the class.
The views for sanity checks in these modules are added on included
but these modules are prepended in another module and then ultimately prepended
in a class.
So the sanity check views are never added to the class and changing the included
to prepended
does not fix the problem.
Steps to reproduce
Change the element name in one of the sanity checks such as here:
security_dashboard_link
=> security_dashboard_link_broken
and from the /qa directory, run:
bundle exec bin/qa Test::Sanity::Selectors
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
The views for sanity checks are NOT currently being added to the class.
bundle exec bin/qa Test::Sanity::Selectors
does not fail with a missing or changed selector
What is the expected correct behavior?
The views for sanity checks are added to the class.
bundle exec bin/qa Test::Sanity::Selectors
should fail with a missing or changed selector
Possible fixes
The fix is not as straight forward as changing the included
to prepended
.