Skip to content

Make sure files in multi-file snippets show correct content

Denys Mishunov requested to merge 229847-blobs-query into master

What does this MR do?

In the multi-file snippet scenario, it makes sure that every blob gets the correct content from GraphQL.

The functionality is still behind the feature flag so no changelog entry has been provided.

How to test?

The whole multi-file snippets functionality is behind a feature flag. So here are the instructions for the click-testing:

  1. In Rails console (rails -c) enable the :snippet_multiple_files flag. This will allow you too add more than just one file to a snippet.
  2. Since adding/removing files to a snippet through web interface is still a wip, you will have to add files in git:
  • Create a new snippet via web interface with a simple dummy file
  • Clone the snippet to your FS (URL can be copied using the blue "Clone" button on the snippet view)
  • On the FS, add more files to your repo and follow the standard procedure of adding/committing/pushing files to your snippet
  • Reload the snippet in your browser.

What to expect? You should see all of your added files in the web interface with the correct content.

NB: Binary files in snippets are not supported atm. Please refer to the corresponding Epic.

Screenshots

Before After
Screenshot_2020-07-27_at_16.47.46 Screenshot_2020-07-27_at_16.44.55

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

References #229847 (closed)

Edited by Denys Mishunov

Merge request reports