Update blob viewer e2e test
What does this MR do?
This change has two aims:
- To fix some flakiness that recently appeared (See !46213 (comment 437031197))
- To restore the test of creating a file via the blob viewer
- Uses specific predicate methods to check for content instead of checking the entire page. This also implicitly waits for loading to complete, which should make the test more reliable.
- Reverts
Resource::File
to create a new file via the blob viewer, after initializing the project with a readme. - Removes some unused code.
- Adds a page object component for the flash notice that appears on many pages.
- Adds a custom RSpec matcher to check for files. A bonus is that it avoids the problem of negated checks for absent elements, allowing a test to have code like
expect(project).not_to have_file(file_name)
which actually performshas_no_file?(name)
.
Does this MR meet the acceptance criteria?
Conformity
Edited by Mark Lapierre