debian-mirror-gitlab/spec/features/projects/tree/create_directory_spec.rb

57 lines
1.1 KiB
Ruby
Raw Normal View History

2018-05-09 12:01:36 +05:30
require 'spec_helper'
2018-11-08 19:23:39 +05:30
describe 'Multi-file editor new directory', :js do
2018-05-09 12:01:36 +05:30
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
before do
2018-11-18 11:00:15 +05:30
project.add_maintainer(user)
2018-05-09 12:01:36 +05:30
sign_in(user)
visit project_tree_path(project, :master)
wait_for_requests
click_link('Web IDE')
wait_for_requests
end
after do
set_cookie('new_repo', 'false')
end
it 'creates directory in current directory' do
2018-11-18 11:00:15 +05:30
all('.ide-tree-actions button').last.click
2018-05-09 12:01:36 +05:30
page.within('.modal') do
find('.form-control').set('folder name')
click_button('Create directory')
end
2018-11-18 11:00:15 +05:30
first('.ide-tree-actions button').click
2018-05-09 12:01:36 +05:30
page.within('.modal-dialog') do
find('.form-control').set('file name')
click_button('Create file')
end
wait_for_requests
2018-10-15 14:42:47 +05:30
find('.js-ide-commit-mode').click
find('.multi-file-commit-list-item').hover
2018-12-05 23:21:45 +05:30
click_button 'Stage'
2018-10-15 14:42:47 +05:30
2018-05-09 12:01:36 +05:30
fill_in('commit-message', with: 'commit message ide')
click_button('Commit')
2018-10-15 14:42:47 +05:30
find('.js-ide-edit-mode').click
2018-05-09 12:01:36 +05:30
expect(page).to have_content('folder name')
end
end