Skip to content

Update blob viewer e2e test

Mark Lapierre requested to merge ml-update-blob-viewer-e2e-test into master

What does this MR do?

This change has two aims:

  1. To fix some flakiness that recently appeared (See !46213 (comment 437031197))
  2. 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 performs has_no_file?(name).

Does this MR meet the acceptance criteria?

Conformity

Edited by Mark Lapierre

Merge request reports