Add qa_selector for new project button to blank state landing page
What does this MR do and why?
Fixes #409892 (closed) by adding a qa-selector
to the blank state landing page for projects. See - #409892 (comment 1412636415)
The test appears to have a flake, as it will work when projects already exist for a user. However if the user has no projects the 'blank state landing page' is instead rendered which has a different layout.
When running a full suite, this flake will only manifest if the spec is the very first to be run in the entire suite, otherwise other tests will have created projects for the test user.
It can be easily reproduced in GDK by deleting all projects for a user, so the blank state landing page is rendered.
This selector is the same as is https://gitlab.com/gitlab-org/gitlab/-/blob/0147ed47a8b4032d381265cbd00ab1a0402f3bb7/app/views/dashboard/_projects_head.html.haml#L10 as both elements should not be rendered together.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Ensure the user in
GITLAB_USERNAME
has no projects on their account so when they login they see the blank state landing page. See #409892 (closed) for example
$ bundle exec rails console
# Use with caution, will delete all projects in GDK
> Project.delete_all
bundle exec rspec qa/specs/features/browser_ui/9_data_stores/project/create_project_spec.rb:32
- Repeat steps for both an
admin
andnon-admin
user
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.