mirror of
https://github.com/neocities/neocities.git
synced 2025-07-25 11:58:28 +02:00
better file create
This commit is contained in:
parent
85fc6d6e39
commit
93b5b94f14
6 changed files with 97 additions and 22 deletions
|
@ -17,10 +17,22 @@ describe 'dashboard' do
|
|||
visit '/dashboard'
|
||||
click_link 'New Folder'
|
||||
fill_in 'name', with: 'testimages'
|
||||
click_button 'Create'
|
||||
#click_button 'Create'
|
||||
all('#createDir button[type=submit]').first.click
|
||||
page.must_have_content /testimages/
|
||||
File.directory?(@site.files_path('testimages')).must_equal true
|
||||
end
|
||||
|
||||
it 'creates a new file' do
|
||||
random = SecureRandom.uuid.gsub('-', '')
|
||||
visit '/dashboard'
|
||||
click_link 'New Page / File'
|
||||
fill_in 'filename', with: "#{random}.html"
|
||||
#click_button 'Create'
|
||||
all('#createFile button[type=submit]').first.click
|
||||
page.must_have_content /#{random}\.html/
|
||||
File.exist?(@site.files_path("#{random}.html")).must_equal true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue