Skip to content

Replace 'browse_files.feature' spinach test with an rspec analog

What does this MR do?

This MR replaces current spinach feature test features/project/source/browse_files.feature with an rspec analog.

Why was this MR needed?

This is a part of spinach tests removal campaign.

Scenarios to be migrated

  • I browse files from master branch
  • I browse files for specific ref
  • I browse file content
  • I browse raw file
  • I can create file
  • I can create file when I don't have write access
  • I can create and commit file
  • I can create and commit file when I don't have write access
  • I can create and commit file with new lines at the end of file
  • I can create and commit file and specify new branch
  • I can upload file and commit
  • I can upload file and commit when I don't have write access
  • I can replace file and commit
  • I can replace file and commit when I don't have write access
  • If I enter an illegal file name I see an error message -> SKIPPED because spaces were allowed by https://gitlab.com/gitlab-org/gitlab-ce/commit/1207d451ed934f3ce2d8c02130a8e6b2cac88a70
  • I can create file with a directory name
  • I can edit file
  • I can edit file when I don't have write access
  • If the file is binary the edit link is hidden
  • I can edit and commit file
  • I can edit and commit file when I don't have write access
  • I can edit and commit file to new branch
  • If I don't change the content of the file I see an error message -> SKIPPED because the original spinach spec is marked as @wip
  • I can create directory in repo -> SKIPPED because there already is an rspec feature spec for this case
  • I can create directory in repo when I don't have write access
  • I attempt to create an existing directory
  • I can see editing preview
  • I can delete file and commit
  • I can delete file and commit when I don't have write access
  • I can browse directory with Browse Dir
  • I can browse file with Browse File
  • I can browse code with Browse Code
  • I click on the permalink link from a branch ref
  • I don't see the permalink link from a SHA ref
  • I browse code with single quotes in the ref
  • I browse code with a leading dot in the directory
  • I browse LFS object
  • I preview an SVG file

todo

  • DRY the drop_in_dropzone method (maybe remove it since there is the dropzone_file method).

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Part of #23036 (closed)

Edited by blackst0ne

Merge request reports