GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit dd56b63e authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'fix-blob-editor-deleting-content' into 'master'

Fixed the blob editor deleting all content for files

Closes #58578

See merge request gitlab-org/gitlab-ce!25865
parents 02e464b6 6a3a28bf
......@@ -13,7 +13,7 @@ export default () => {
if (editBlobForm.length) {
const urlRoot = editBlobForm.data('relativeUrlRoot');
const assetsPath = editBlobForm.data('assetsPrefix');
const filePath = editBlobForm.data('blobFilename');
const filePath = `${editBlobForm.data('blobFilename')}`;
const currentAction = $('.js-file-title').data('currentAction');
const projectId = editBlobForm.data('project-id');
const isMarkdown = editBlobForm.data('is-markdown');
......
---
title: Fixed blob editor deleting file content for certain file paths
merge_request:
author:
type: fixed
......@@ -49,6 +49,15 @@ describe 'Editing file blob', :js do
end
end
it 'updates the content of file with a number as file path' do
project.repository.create_file(user, '1', 'test', message: 'testing', branch_name: branch)
visit project_blob_path(project, tree_join(branch, '1'))
edit_and_commit
expect(page).to have_content 'NextFeature'
end
context 'from blob file path' do
before do
visit project_blob_path(project, tree_join(branch, file_path))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment