Make sure files in multi-file snippets show correct content
What does this MR do?
In the multi-file snippet scenario, it makes sure that every blob gets the correct content from GraphQL.
How to test?
The whole multi-file snippets functionality is behind a feature flag. So here are the instructions for the click-testing:
- 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. - 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 |
---|---|
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
References #229847 (closed)
Edited by Denys Mishunov